as: token: add support for [ and ] tokens

This commit is contained in:
Mikael Pettersson
2023-10-18 20:03:24 +02:00
parent 8c0611d333
commit 526a33a732
2 changed files with 6 additions and 0 deletions

View File

@@ -88,9 +88,11 @@ format(Token) ->
?T_COLON -> ":";
?T_COMMA -> ",";
?T_DOT -> ".";
?T_LBRACK -> "[";
?T_LPAREN -> "(";
?T_MINUS -> "-";
?T_PLUS -> "+";
?T_RBRACK -> "]";
?T_RPAREN -> ")";
?T_NEWLINE -> "<newline>";
?T_EOF -> "<eof>"

View File

@@ -62,9 +62,11 @@
-define(T_COLON, 'T_COLON'). % :
-define(T_COMMA, 'T_COMMA'). % ,
-define(T_DOT, 'T_DOT'). % .
-define(T_LBRACK, 'T_LBRACK'). % [
-define(T_LPAREN, 'T_LPAREN'). % (
-define(T_MINUS, 'T_MINUS'). % -
-define(T_PLUS, 'T_PLUS'). % +
-define(T_RBRACK, 'T_RBRACK'). % ]
-define(T_RPAREN, 'T_RPAREN'). % )
%% synthetic symbols
@@ -101,9 +103,11 @@
| ?T_COLON
| ?T_COMMA
| ?T_DOT
| ?T_LBRACK
| ?T_LPAREN
| ?T_MINUS
| ?T_PLUS
| ?T_RBRACK
| ?T_RPAREN
| ?T_NEWLINE
| ?T_EOF