Add symbols.

pull/70/head
Rob Rix 2016-02-18 20:19:01 +07:00
parent cbb5e87f18
commit a64575bcc7
2 changed files with 27 additions and 0 deletions

@ -68,6 +68,8 @@ module.exports = grammar({
)
)),
symbol: $ => token(seq(':', choice($._function_name, $._variable))),
_function_name: $ => choice($.identifier, '..', '|'),
_line_break: $ => '\n',

25
src/grammar.json vendored

@ -565,6 +565,31 @@
]
}
},
"symbol": {
"type": "TOKEN",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ":"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_function_name"
},
{
"type": "SYMBOL",
"name": "_variable"
}
]
}
]
}
},
"_function_name": {
"type": "CHOICE",
"members": [