Skip to content

Commit 9d74251

Browse files
committed
Add support for noreturn routine directive
1 parent 8c52e37 commit 9d74251

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

core/src/defaults/lexer.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ const fn make_byte_map<T: Copy>(map: &[(ByteSet<'_>, T)], default: T) -> [T; 256
321321
// endregion: byte-set
322322

323323
// region: keywords
324-
const KEYWORDS: [(&str, RawTokenType); 122] = [
324+
const KEYWORDS: [(&str, RawTokenType); 123] = [
325325
("absolute", TT::IdentifierOrKeyword(KK::Absolute)),
326326
("abstract", TT::IdentifierOrKeyword(KK::Abstract)),
327327
("align", TT::IdentifierOrKeyword(KK::Align)),
@@ -385,6 +385,7 @@ const KEYWORDS: [(&str, RawTokenType); 122] = [
385385
("near", TT::IdentifierOrKeyword(KK::Near)),
386386
("nil", TT::Keyword(KK::Nil)),
387387
("nodefault", TT::IdentifierOrKeyword(KK::NoDefault)),
388+
("noreturn", TT::IdentifierOrKeyword(KK::NoReturn)),
388389
("not", TT::Keyword(KK::Not)),
389390
("object", TT::Keyword(KK::Object)),
390391
("of", TT::Keyword(KK::Of)),

core/src/defaults/parser/token_consolidation_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ method_directive_consolidation_test!(
157157
method_directive_ident_consolidation_test!(
158158
forward = { "FORWARD" },
159159
external = { "EXTERNAL" },
160+
noreturn = { "NORETURN" },
160161
name = { "NAME dll_name" },
161162
index = { "INDEX 1" },
162163
delayed = { "DELAYED" },

core/src/lang.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ pub enum KeywordKind {
146146
Name,
147147
Near,
148148
NoDefault,
149+
NoReturn,
149150
On,
150151
Operator,
151152
Out,
@@ -192,6 +193,7 @@ impl KeywordKind {
192193
| KeywordKind::Abstract
193194
| KeywordKind::Final
194195
| KeywordKind::Inline
196+
| KeywordKind::NoReturn
195197
| KeywordKind::Assembler
196198
| KeywordKind::Cdecl
197199
| KeywordKind::Pascal

0 commit comments

Comments
 (0)