easy way to write data-reviser code: write sample code named dr
then compile to javascript or typescript by this tool.
- only support
Linux
system so far. make
andg++
.
make install
make uninstall
specify typescript code output directory, may be a absolute path or relative path base on pwd
same as --ts-output
, but for javascript code.
specify output type, fs
will write code to a file on disk. default terminal
- create
example.dr
then type below:enum Color { Red = 1, Blue, Yellow } struct Foo { required string foo = "foo"; bool baz = true; Color bar = Color.Red; int32 age = 0; }
- execute
reviserc --ts-output=tsoutput example.dr
will output code to the terminal.
- base on vscode
Remote-Containers
https://code.visualstudio.com/docs/remote/containers - execute
Remote-Containers: Open Folder In Contaier
in vscode then chose this project root dir.
see grammer.md
- support comment.
- compile to javascript.
- compile to typescript.
- support
struct
types. - support
array<struct>
types. - support
enum
,array<T>
types. -
decorator
allow parameters. - check data type.
- support nested statement
- support scope.
- support write to file.
- validate default value such as int64.
- support package & import.
- syntax highligth for editor.
- delete unused ast pointer.
MIT