Remove single-line comment style

This commit is contained in:
Max Brunsfeld 2018-10-28 14:21:26 -07:00
parent 7add08036c
commit ef2b62a852
3 changed files with 1440 additions and 1471 deletions

View File

@ -317,13 +317,10 @@ module.exports = grammar({
at_keyword: $ => /@[a-zA-Z-_]+/, at_keyword: $ => /@[a-zA-Z-_]+/,
comment: $ => token(choice( comment: $ => token(seq(
seq('//', /.*/), '/*',
seq( /[^*]*\*+([^/*][^*]*\*+)*/,
'/*', '/'
/[^*]*\*+([^/*][^*]*\*+)*/,
'/'
)
)) ))
} }
}) })

36
src/grammar.json vendored
View File

@ -1571,37 +1571,19 @@
"comment": { "comment": {
"type": "TOKEN", "type": "TOKEN",
"content": { "content": {
"type": "CHOICE", "type": "SEQ",
"members": [ "members": [
{ {
"type": "SEQ", "type": "STRING",
"members": [ "value": "/*"
{
"type": "STRING",
"value": "//"
},
{
"type": "PATTERN",
"value": ".*"
}
]
}, },
{ {
"type": "SEQ", "type": "PATTERN",
"members": [ "value": "[^*]*\\*+([^\\/*][^*]*\\*+)*"
{ },
"type": "STRING", {
"value": "/*" "type": "STRING",
}, "value": "/"
{
"type": "PATTERN",
"value": "[^*]*\\*+([^\\/*][^*]*\\*+)*"
},
{
"type": "STRING",
"value": "/"
}
]
} }
] ]
} }

2864
src/parser.c vendored

File diff suppressed because it is too large Load Diff