Commit Graph

105 Commits

Author SHA1 Message Date
Tony Garnock-Jones be32f9b7c8 Remove single-precision floats from the implementations 2024-01-27 14:40:37 +01:00
Tony Garnock-Jones 7178fb0d9b Repair constructor generation; attach schemas 2023-12-17 22:29:09 +13:00
Tony Garnock-Jones f6ddf0ca3b Interpreter 2023-12-17 11:05:25 +13:00
Tony Garnock-Jones 9c7770a54f Repair codegen for setof and dictof 2023-12-17 11:05:07 +13:00
Tony Garnock-Jones cd29602761 Host types 2023-12-17 11:02:53 +13:00
Tony Garnock-Jones 2e84614b3b Allow "sufficiently identifierlike" values in dictionaries too 2023-11-03 10:31:44 +01:00
Tony Garnock-Jones 01d3659216 Split out @preserves/schema-cli from @preserves/schema 2023-10-19 02:27:01 +02:00
Tony Garnock-Jones b7a2acf65b Update implementations for simplified binary syntax.
As part of this, I noticed a problem when updating the Rust
implementation. With the BF..84 design for annotations, if you are
wanting to skip annotations—for example, if you're parsing
incrementally, SAX-style, ignoring annotations—then with any
parenthesised form you have to remember to check for and skip something
after reading a term. This is awkward, so I want to revisit the design
of annotations and go back to the prefix-form (85..) of the
current-mainline design.
2023-10-14 21:29:09 +02:00
Tony Garnock-Jones b41c0125b0 Treat `arguments` as a JavaScript keyword too. 2023-06-09 16:44:34 +02:00
Tony Garnock-Jones d027fc4ed6 Repair setof codegen 2023-02-11 18:10:36 +01:00
Tony Garnock-Jones cd996bcbc7 Repair set schema parsing 2023-02-11 17:28:03 +01:00
Tony Garnock-Jones d73118fc77 Update implementations 2023-02-07 10:42:30 +01:00
Tony Garnock-Jones 340f809c55 isSequence 2023-01-05 15:13:23 +01:00
Tony Garnock-Jones e3a1be80e9 Repair preserves-schema-ts watch mode 2022-05-03 17:12:34 +02:00
Tony Garnock-Jones 0129901dab Javascript pretty-printer 2022-01-26 14:15:35 +01:00
Tony Garnock-Jones f6999938f8 More ergonomic definition of variant name 2022-01-22 23:53:07 +01:00
Tony Garnock-Jones 382bf8d956 Expose reflection typedefs 2022-01-22 23:45:24 +01:00
Tony Garnock-Jones ae6eaa663e Expose a touch more static information, e.g. __as_preserve__ and __from_preserve__. 2022-01-22 23:25:16 +01:00
Tony Garnock-Jones a98aa357d4 Repair command-line handling 2022-01-22 23:20:35 +01:00
Tony Garnock-Jones 944ac54414 Dumber but more reliable and more useful handling of schema input base directories 2021-12-13 12:52:24 +01:00
Tony Garnock-Jones 3b1669389c Allow cross-references to other schemas when generating code 2021-12-13 12:18:12 +01:00
Tony Garnock-Jones fc84813704 Expose schema compiler's gentype.ts module 2021-12-12 23:52:45 +01:00
Tony Garnock-Jones 972085a59b Use GenericEmbedded for embedded schemas 2021-12-12 23:52:31 +01:00
Tony Garnock-Jones 80dd3cd6b4 Support access to "external" schema module via some dotted path within a TypeScript module 2021-12-12 22:58:00 +01:00
Tony Garnock-Jones 282d3f798f Support references to node_modules modules on command line 2021-12-12 13:49:50 +01:00
Tony Garnock-Jones 1e4bf0dc51 Export reflective information about schema-generated types 2021-12-09 18:36:45 +01:00
Tony Garnock-Jones 6576f30639 Refactoring of uncertain benefit: allow multiple function definitions at once 2021-12-03 14:42:49 +01:00
Tony Garnock-Jones e12d978915 Upgrade to TypeScript 4.5 2021-12-03 14:42:25 +01:00
Tony Garnock-Jones 3a605e75d6 Better treatment of generics in TypeScript schema compiler, after the Rust implementation 2021-10-11 12:56:53 +02:00
Tony Garnock-Jones 60d1be41a3 Rename NamedSimplePattern_ -> Binding 2021-06-25 10:25:26 +02:00
Tony Garnock-Jones fdb43f6292 Constrain names/identifiers in schemas to be lowest-common-denominator. 2021-06-25 09:45:07 +02:00
Tony Garnock-Jones 498c63ef67 Repair embedded reading; and preserve annotations in generic embedded values 2021-06-01 16:46:23 +02:00
Tony Garnock-Jones 8d96743d53 Redo schema embedded value patterns to use embedded syntax and an interface schema 2021-06-01 16:10:04 +02:00
Tony Garnock-Jones 460529e1c7 Clean up language wrt invertibility/"bijection" 2021-05-25 20:13:02 +02:00
Tony Garnock-Jones 669d1b480d Name is already always supplied, no need to add it 2021-05-25 11:01:55 +02:00
Tony Garnock-Jones 7d06c7dce0 Repair dict "named" generation 2021-05-25 10:49:35 +02:00
Tony Garnock-Jones 4914c8cd68 Move type/gentype back into compiler where it belongs 2021-05-24 12:05:02 +02:00
Tony Garnock-Jones 46d76dfca7 Redo bijection checking without using gentype 2021-05-24 12:03:04 +02:00
Tony Garnock-Jones 0db223ede8 More tests, and variant label duplicate check 2021-05-24 11:53:25 +02:00
Tony Garnock-Jones a1fdddcf7b Simple tests; more exports 2021-05-24 11:27:46 +02:00
Tony Garnock-Jones 9bdfc4c3ab Split compute from report 2021-05-24 10:16:00 +02:00
Tony Garnock-Jones 2559a4713f Much improved refactoring/repair of metaschema 2021-05-24 00:15:31 +02:00
Tony Garnock-Jones 1654ad4c80 Repair error reporting 2021-05-21 17:33:29 +02:00
Tony Garnock-Jones dbd6c3cf53 Repair checker 2021-05-21 17:28:18 +02:00
Tony Garnock-Jones 2bde06f509 Add omitted checkBinding call 2021-05-21 16:14:58 +02:00
Tony Garnock-Jones 0f1ea4aa20 Further simplification 2021-05-21 16:01:04 +02:00
Tony Garnock-Jones b5b4effeac Simplify unconverter generation even further 2021-05-21 15:56:01 +02:00
Tony Garnock-Jones 20b676df27 Move insufficient-information checking to read-time 2021-05-21 15:49:06 +02:00
Tony Garnock-Jones ecdb314366 Require at least two branches in "&" and "/" 2021-05-21 11:20:25 +02:00
Tony Garnock-Jones 10380e451a Simplify schemas by allowing at most one of "&" or "/" in a definition 2021-05-20 22:34:20 +02:00