OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library servicec.keyword; | 5 library servicec.keyword; |
6 | 6 |
7 import "package:compiler/src/tokens/keyword.dart" as dart2js; | 7 import "package:compiler/src/tokens/keyword.dart" as dart2js; |
8 | 8 |
9 /// Custom Keyword class for the servicec front-end. | 9 /// Custom Keyword class for the servicec front-end. |
10 class Keyword extends dart2js.Keyword { | 10 class Keyword extends dart2js.Keyword { |
11 static const Keyword service = const Keyword("service"); | 11 static const Keyword service = const Keyword("service"); |
12 static const Keyword struct = const Keyword("struct"); | 12 static const Keyword struct = const Keyword("struct"); |
13 static const Keyword union = const Keyword("union"); | 13 static const Keyword union = const Keyword("union"); |
14 | 14 |
15 static Map<String, Keyword> keywords = { | 15 static Map<String, Keyword> keywords = { |
16 "service": service, | 16 "service": service, |
17 "struct" : struct, | 17 "struct" : struct, |
18 "union" : union | 18 "union" : union |
19 }; | 19 }; |
20 | 20 |
21 const Keyword(String syntax) | 21 const Keyword(String syntax) |
22 : super(syntax); | 22 : super(syntax); |
23 } | 23 } |
OLD | NEW |