[javascript] Separate @ from Identifier

This commit is contained in:
Andreas Dangel
2023-10-26 16:36:50 +02:00
parent 59a23b1f8a
commit 567bf9ed71
2 changed files with 13 additions and 3 deletions

View File

@ -281,8 +281,7 @@ TOKEN :
| |
[ [
"$", "$",
"_", "_"
"@"
] ]
| |
<UNICODE_ESCAPE_SEQUENCE> <UNICODE_ESCAPE_SEQUENCE>
@ -784,3 +783,13 @@ TOKEN :
| < RSIGNEDSHIFTASSIGN: ">>=" > : DEFAULT | < RSIGNEDSHIFTASSIGN: ">>=" > : DEFAULT
| < RUNSIGNEDSHIFTASSIGN: ">>>=" > : DEFAULT | < RUNSIGNEDSHIFTASSIGN: ">>>=" > : DEFAULT
} }
/*
* Decorators
* See https://github.com/tc39/proposal-decorators
*/
<DEFAULT,NOREGEXP,NOEOL>
TOKEN :
{
< AT: "@" > : DEFAULT
}

View File

@ -1,6 +1,7 @@
[Image] or [Truncated image[ Bcol Ecol [Image] or [Truncated image[ Bcol Ecol
L2 L2
[@annotation] 1 12 [@] 1 2
[annotation ] 2 12
L3 L3
[class] 1 6 [class] 1 6
[MyClass] 7 14 [MyClass] 7 14