Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/treeplate/syllad
https://github.com/treeplate/syllad
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/treeplate/syllad
- Owner: treeplate
- Created: 2021-10-10T19:56:55.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-27T23:00:34.000Z (8 months ago)
- Last Synced: 2024-12-12T10:36:51.247Z (24 days ago)
- Language: Dart
- Size: 2.94 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SYLLAD
Whitespace is purely cosmetic, except for separating identifiers and/or integers.
```
*
*
```
## TOKENS
### STRINGS
Strings start with `"` or `'` (the 'quote character'), {set *buffer* to empty} then one of:
- the quote character, which ends the string. {The resulting string has content *buffer*}
- `\`, then a character {append a newline to *buffer* if the character is `n`, otherwise append the character to *buffer*}. This character will not end the string if it is the quote character, and not escape the character after if it's `\`.
- any other character. {append it to *buffer*}
### INTEGERS
Integers start with one of `0123456789` {set *buffer* to that character} and then any number of:
`0123456789xabcdefXABCDEF` {add each character tokenized to *buffer*, the resulting integer has content of the result of calling dart's int.tryParse method with *buffer* as the only argument, if it returns null it is an invalid integer}.
### IDENTIFIERS
Identifiers start with one character out of `a`-`z`, `A`-`Z`, `_` {set *buffer* to that character}, then any number of those characters or any of `0123456789` {add each character tokenized to *buffer*, the resulting identifier has content *buffer*}
### OTHER STUFF
semicolon, `;`
EOFopenParen, `(`
closeParen, `)`
openSquare, `[`
closeSquare, `]`
openBrace, `{`
closeBrace, `}`comma, `,`
period, `.`
ellipsis, `...`
bang, `!`plus, `+`
minus, `-`
divide, `/`
multiply, `*`
remainder, `%`equals, `==`
notEquals, `!=`
greater, `>`
greaterEqual, `>=`
lessEqual, `<=`
less, `<`andand, `&&`
oror, `||`bitAnd, `&`
bitOr, `|`
bitXor, `^`
tilde, `~`
leftShift, `<<`
rightShift, `>>`set, `=`
## IMPORTS
Imports consist of the IDENTIFIER `import`, followed by a STRING {*path*}, followed by SEMICOLON.
{This runs the file *path* and adds the resulting variables to the current file scope, as well as *path*'s own file scope if *path* hasn't been}