-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip (#654): added basic ast structure of the try-catch-statement.ts
- Loading branch information
1 parent
f00a62c
commit 7a72bdb
Showing
20 changed files
with
2,558 additions
and
1,817 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
FStringExpStart=1 | ||
BlockComment=2 | ||
LineComment=3 | ||
Pragma=4 | ||
Const=5 | ||
Var=6 | ||
As=7 | ||
Spread=8 | ||
Switch=9 | ||
Case=10 | ||
Default=11 | ||
Break=12 | ||
Continue=13 | ||
Do=14 | ||
While=15 | ||
If=16 | ||
Else=17 | ||
For=18 | ||
Enum=19 | ||
DefFunc=20 | ||
Return=21 | ||
CallFunc=22 | ||
RetIndicator=23 | ||
Class=24 | ||
Interface=25 | ||
Constructor=26 | ||
True=27 | ||
False=28 | ||
Typeof=29 | ||
Try=30 | ||
Catch=31 | ||
Finally=32 | ||
Void=33 | ||
Null=34 | ||
Undefined=35 | ||
Comma=36 | ||
SemiColon=37 | ||
QuestionMark=38 | ||
Colon=39 | ||
LeftParen=40 | ||
RightParen=41 | ||
LeftBracket=42 | ||
RightBracket=43 | ||
FStringExpEnd=44 | ||
LeftBrace=45 | ||
RightBrace=46 | ||
Plus=47 | ||
PlusPlus=48 | ||
Minus=49 | ||
MinusMinus=50 | ||
Star=51 | ||
Div=52 | ||
Mod=53 | ||
PowerTo=54 | ||
AndAnd=55 | ||
OrOr=56 | ||
Not=57 | ||
Assign=58 | ||
PlusAssign=59 | ||
MinusAssign=60 | ||
StarAssign=61 | ||
DivAssign=62 | ||
ModAssign=63 | ||
Equal=64 | ||
NotEqual=65 | ||
Less=66 | ||
LessEqual=67 | ||
Greater=68 | ||
GreaterEqual=69 | ||
BitwiseAnd=70 | ||
BitwiseOr=71 | ||
BitwiseXor=72 | ||
BitwiseNot=73 | ||
BitwiseZeroFillLeftShift=74 | ||
BitwiseSignedRightShift=75 | ||
BitwiseZeroFillRightShift=76 | ||
Dot=77 | ||
Identifier=78 | ||
IntegerConstant=79 | ||
SingleQuoteStringLiteral=80 | ||
DoubleQuoteStringLiteral=81 | ||
FloatingConstant=82 | ||
Whitespace=83 | ||
Newline=84 | ||
FStringSingleQuoteStart=85 | ||
FStringDoubleQuoteStart=86 | ||
FStringSingleQuoteEnd=87 | ||
FStringSingleQuoteAtom=88 | ||
FStringDoubleQuoteEnd=89 | ||
FStringDoubleQuoteAtom=90 | ||
'const'=5 | ||
'var'=6 | ||
'as'=7 | ||
'...'=8 | ||
'switch'=9 | ||
'case'=10 | ||
'default'=11 | ||
'break'=12 | ||
'continue'=13 | ||
'do'=14 | ||
'while'=15 | ||
'if'=16 | ||
'else'=17 | ||
'for'=18 | ||
'enum'=19 | ||
'def'=20 | ||
'return'=21 | ||
'call'=22 | ||
'->'=23 | ||
'class'=24 | ||
'interface'=25 | ||
'constructor'=26 | ||
'true'=27 | ||
'false'=28 | ||
'typeof'=29 | ||
'try'=30 | ||
'catch'=31 | ||
'finally'=32 | ||
'void'=33 | ||
'null'=34 | ||
'undefined'=35 | ||
','=36 | ||
';'=37 | ||
'?'=38 | ||
':'=39 | ||
'('=40 | ||
')'=41 | ||
'['=42 | ||
']'=43 | ||
'{'=45 | ||
'}'=46 | ||
'+'=47 | ||
'++'=48 | ||
'-'=49 | ||
'--'=50 | ||
'*'=51 | ||
'/'=52 | ||
'%'=53 | ||
'**'=54 | ||
'&&'=55 | ||
'||'=56 | ||
'!'=57 | ||
'='=58 | ||
'+='=59 | ||
'-='=60 | ||
'*='=61 | ||
'/='=62 | ||
'%='=63 | ||
'=='=64 | ||
'!='=65 | ||
'<'=66 | ||
'<='=67 | ||
'>'=68 | ||
'>='=69 | ||
'&'=70 | ||
'|'=71 | ||
'^'=72 | ||
'~'=73 | ||
'<<'=74 | ||
'>>'=75 | ||
'>>>'=76 | ||
'.'=77 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
FStringExpStart=1 | ||
BlockComment=2 | ||
LineComment=3 | ||
Pragma=4 | ||
Const=5 | ||
Var=6 | ||
As=7 | ||
Spread=8 | ||
Switch=9 | ||
Case=10 | ||
Default=11 | ||
Break=12 | ||
Continue=13 | ||
Do=14 | ||
While=15 | ||
If=16 | ||
Else=17 | ||
For=18 | ||
Enum=19 | ||
DefFunc=20 | ||
Return=21 | ||
CallFunc=22 | ||
RetIndicator=23 | ||
Class=24 | ||
Interface=25 | ||
Constructor=26 | ||
True=27 | ||
False=28 | ||
Typeof=29 | ||
Try=30 | ||
Catch=31 | ||
Finally=32 | ||
Void=33 | ||
Null=34 | ||
Undefined=35 | ||
Comma=36 | ||
SemiColon=37 | ||
QuestionMark=38 | ||
Colon=39 | ||
LeftParen=40 | ||
RightParen=41 | ||
LeftBracket=42 | ||
RightBracket=43 | ||
FStringExpEnd=44 | ||
LeftBrace=45 | ||
RightBrace=46 | ||
Plus=47 | ||
PlusPlus=48 | ||
Minus=49 | ||
MinusMinus=50 | ||
Star=51 | ||
Div=52 | ||
Mod=53 | ||
PowerTo=54 | ||
AndAnd=55 | ||
OrOr=56 | ||
Not=57 | ||
Assign=58 | ||
PlusAssign=59 | ||
MinusAssign=60 | ||
StarAssign=61 | ||
DivAssign=62 | ||
ModAssign=63 | ||
Equal=64 | ||
NotEqual=65 | ||
Less=66 | ||
LessEqual=67 | ||
Greater=68 | ||
GreaterEqual=69 | ||
BitwiseAnd=70 | ||
BitwiseOr=71 | ||
BitwiseXor=72 | ||
BitwiseNot=73 | ||
BitwiseZeroFillLeftShift=74 | ||
BitwiseSignedRightShift=75 | ||
BitwiseZeroFillRightShift=76 | ||
Dot=77 | ||
Identifier=78 | ||
IntegerConstant=79 | ||
SingleQuoteStringLiteral=80 | ||
DoubleQuoteStringLiteral=81 | ||
FloatingConstant=82 | ||
Whitespace=83 | ||
Newline=84 | ||
FStringSingleQuoteStart=85 | ||
FStringDoubleQuoteStart=86 | ||
FStringSingleQuoteEnd=87 | ||
FStringSingleQuoteAtom=88 | ||
FStringDoubleQuoteEnd=89 | ||
FStringDoubleQuoteAtom=90 | ||
'const'=5 | ||
'var'=6 | ||
'as'=7 | ||
'...'=8 | ||
'switch'=9 | ||
'case'=10 | ||
'default'=11 | ||
'break'=12 | ||
'continue'=13 | ||
'do'=14 | ||
'while'=15 | ||
'if'=16 | ||
'else'=17 | ||
'for'=18 | ||
'enum'=19 | ||
'def'=20 | ||
'return'=21 | ||
'call'=22 | ||
'->'=23 | ||
'class'=24 | ||
'interface'=25 | ||
'constructor'=26 | ||
'true'=27 | ||
'false'=28 | ||
'typeof'=29 | ||
'try'=30 | ||
'catch'=31 | ||
'finally'=32 | ||
'void'=33 | ||
'null'=34 | ||
'undefined'=35 | ||
','=36 | ||
';'=37 | ||
'?'=38 | ||
':'=39 | ||
'('=40 | ||
')'=41 | ||
'['=42 | ||
']'=43 | ||
'{'=45 | ||
'}'=46 | ||
'+'=47 | ||
'++'=48 | ||
'-'=49 | ||
'--'=50 | ||
'*'=51 | ||
'/'=52 | ||
'%'=53 | ||
'**'=54 | ||
'&&'=55 | ||
'||'=56 | ||
'!'=57 | ||
'='=58 | ||
'+='=59 | ||
'-='=60 | ||
'*='=61 | ||
'/='=62 | ||
'%='=63 | ||
'=='=64 | ||
'!='=65 | ||
'<'=66 | ||
'<='=67 | ||
'>'=68 | ||
'>='=69 | ||
'&'=70 | ||
'|'=71 | ||
'^'=72 | ||
'~'=73 | ||
'<<'=74 | ||
'>>'=75 | ||
'>>>'=76 | ||
'.'=77 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
kipper/core/src/compiler/ast/nodes/statements/try-catch-statement/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./try-catch-statement"; | ||
export * from "./try-catch-statement-semantics"; | ||
export * from "./try-catch-statement-type-semantics"; |
13 changes: 13 additions & 0 deletions
13
...re/src/compiler/ast/nodes/statements/try-catch-statement/try-catch-statement-semantics.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* Semantics for AST Node {@link IfStatement}. | ||
* @since 0.12.0 | ||
*/ | ||
import type { SemanticData } from "../../../ast-node"; | ||
|
||
/** | ||
* Semantics for AST Node {@link IfStatement}. | ||
* @since 0.12.0 | ||
*/ | ||
export interface TryCatchStatementSemantics extends SemanticData { | ||
|
||
} |
Oops, something went wrong.