Skip to content

Commit

Permalink
@ is a character
Browse files Browse the repository at this point in the history
  • Loading branch information
shnarazk committed May 28, 2023
1 parent 5201d4b commit a56f2d2
Show file tree
Hide file tree
Showing 4 changed files with 788 additions and 789 deletions.
3 changes: 1 addition & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ module.exports = grammar({
block: $ => seq("{", repeat($.CASE_opt), $.CASE_end, "}"),

number: $ => token(choice(/¯?[∞]/, /¯π([eE]¯?\d+)?/, /¯?\d+(\.\d+)?([eE]¯?\d+)?/)),
character: $ => choice(/'.'/, /'\\u[0-9a-fA-F]{4}'/),
character: $ => choice('@', /'.'/, /'\\u[0-9a-fA-F]{4}'/),
string: $ => token(seq('"', repeat(choice('""', /[^"]+/)), '"')),
system_s: $ => token(seq(
"•",
Expand All @@ -187,7 +187,6 @@ module.exports = grammar({
'𝕨', '𝕩', '𝕗', '𝕘', '𝕤',
),
symbol_sl: $ => choice(
'@',
$.character, $.string, $.number
),
system_F: $ => token(seq(
Expand Down
8 changes: 4 additions & 4 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -1782,6 +1782,10 @@
"character": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "@"
},
{
"type": "PATTERN",
"value": "'.'"
Expand Down Expand Up @@ -1892,10 +1896,6 @@
"symbol_sl": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "@"
},
{
"type": "SYMBOL",
"name": "character"
Expand Down
2 changes: 1 addition & 1 deletion src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@
"fields": {},
"children": {
"multiple": false,
"required": false,
"required": true,
"types": [
{
"type": "character",
Expand Down
Loading

0 comments on commit a56f2d2

Please sign in to comment.