feat: yjs keyword sharable

This commit is contained in:
Xuxin Wang 2023-06-25 16:35:21 +08:00
parent 8e06d0bc81
commit 00a3f79fb8
2 changed files with 14 additions and 0 deletions

View File

@ -140,6 +140,7 @@ In: 'in';
Try: 'try';
Event: 'event';
AtToken: '@';
Sharable: 'sharable';
/// Event Semantics

View File

@ -63,6 +63,7 @@ clzOrFunctionDeclaration
|functionDeclaration
|interfaceDeclaration
|eventDeclaration
|sharableDeclaration
;
interfaceDeclaration
@ -120,6 +121,17 @@ block
statementList
: statement+
;
sharableDeclaration
: sharableStatement
;
sharableStatement
: sharableModifier variableDeclarationList eos
;
sharableModifier // let, const - ECMAScript 6
: Sharable
;
variableStatement
: varModifier variableDeclarationList eos
@ -441,6 +453,7 @@ keyword
| Protected
| Static
| Yield
| Sharable
;
eos