mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-19 08:24:15 -06:00
Parse abstract keyword
This commit is contained in:
parent
64f3798bd7
commit
dd1f982bde
@ -43,6 +43,7 @@ module ts {
|
||||
}
|
||||
|
||||
let textToToken: Map<SyntaxKind> = {
|
||||
"abstract": SyntaxKind.AbstractKeyword,
|
||||
"any": SyntaxKind.AnyKeyword,
|
||||
"as": SyntaxKind.AsKeyword,
|
||||
"boolean": SyntaxKind.BooleanKeyword,
|
||||
|
||||
@ -131,6 +131,7 @@ module ts {
|
||||
StaticKeyword,
|
||||
YieldKeyword,
|
||||
// Contextual keywords
|
||||
AbstractKeyword,
|
||||
AsKeyword,
|
||||
AnyKeyword,
|
||||
BooleanKeyword,
|
||||
@ -307,17 +308,18 @@ module ts {
|
||||
Private = 0x00000020, // Property/Method
|
||||
Protected = 0x00000040, // Property/Method
|
||||
Static = 0x00000080, // Property/Method
|
||||
Default = 0x00000100, // Function/Class (export default declaration)
|
||||
MultiLine = 0x00000200, // Multi-line array or object literal
|
||||
Synthetic = 0x00000400, // Synthetic node (for full fidelity)
|
||||
DeclarationFile = 0x00000800, // Node is a .d.ts file
|
||||
Let = 0x00001000, // Variable declaration
|
||||
Const = 0x00002000, // Variable declaration
|
||||
OctalLiteral = 0x00004000, // Octal numeric literal
|
||||
Namespace = 0x00008000, // Namespace declaration
|
||||
ExportContext = 0x00010000, // Export context (initialized by binding)
|
||||
Abstract = 0x00000100,
|
||||
Default = 0x00000200, // Function/Class (export default declaration)
|
||||
MultiLine = 0x00000400, // Multi-line array or object literal
|
||||
Synthetic = 0x00000800, // Synthetic node (for full fidelity)
|
||||
DeclarationFile = 0x00001000, // Node is a .d.ts file
|
||||
Let = 0x00002000, // Variable declaration
|
||||
Const = 0x00004000, // Variable declaration
|
||||
OctalLiteral = 0x00008000, // Octal numeric literal
|
||||
Namespace = 0x00010000, // Namespace declaration
|
||||
ExportContext = 0x00020000, // Export context (initialized by binding)
|
||||
|
||||
Modifier = Export | Ambient | Public | Private | Protected | Static | Default,
|
||||
Modifier = Export | Ambient | Public | Private | Protected | Static | Abstract | Default,
|
||||
AccessibilityModifier = Public | Private | Protected,
|
||||
BlockScoped = Let | Const
|
||||
}
|
||||
|
||||
@ -1141,6 +1141,7 @@ module ts {
|
||||
case SyntaxKind.PrivateKeyword:
|
||||
case SyntaxKind.ProtectedKeyword:
|
||||
case SyntaxKind.StaticKeyword:
|
||||
case SyntaxKind.AbstractKeyword:
|
||||
case SyntaxKind.ExportKeyword:
|
||||
case SyntaxKind.DeclareKeyword:
|
||||
case SyntaxKind.ConstKeyword:
|
||||
@ -1626,6 +1627,7 @@ module ts {
|
||||
case SyntaxKind.PublicKeyword: return NodeFlags.Public;
|
||||
case SyntaxKind.ProtectedKeyword: return NodeFlags.Protected;
|
||||
case SyntaxKind.PrivateKeyword: return NodeFlags.Private;
|
||||
case SyntaxKind.AbstractKeyword: return NodeFlags.Abstract;
|
||||
case SyntaxKind.ExportKeyword: return NodeFlags.Export;
|
||||
case SyntaxKind.DeclareKeyword: return NodeFlags.Ambient;
|
||||
case SyntaxKind.ConstKeyword: return NodeFlags.Const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user