add noreturn and unreachable
This commit is contained in:
@@ -242,7 +242,7 @@ module.exports = grammar({
|
||||
_type_constant: $ => seq(optional('-'), choice($.integer, $.character)),
|
||||
|
||||
builtin_type: _ => choice(
|
||||
'void', 'type', 'anyopaque', 'bool', 'int', 'uint', 'float', 'range',
|
||||
'void', 'noreturn', 'type', 'anyopaque', 'bool', 'int', 'uint', 'float', 'range',
|
||||
'i8', 'i16', 'i32', 'i64', 'u8', 'u16', 'u32', 'u64',
|
||||
'isize', 'usize', 'f32', 'f64',
|
||||
'c_char', 'c_schar', 'c_uchar', 'c_short', 'c_ushort',
|
||||
@@ -462,6 +462,7 @@ module.exports = grammar({
|
||||
$.character,
|
||||
$.boolean,
|
||||
$.null,
|
||||
$.unreachable,
|
||||
$.undefined,
|
||||
),
|
||||
|
||||
@@ -645,6 +646,7 @@ module.exports = grammar({
|
||||
|
||||
boolean: _ => choice('true', 'false'),
|
||||
null: _ => 'null',
|
||||
unreachable: _ => 'unreachable',
|
||||
undefined: _ => 'undefined',
|
||||
sink: _ => '_',
|
||||
|
||||
@@ -653,10 +655,10 @@ module.exports = grammar({
|
||||
alias(choice(
|
||||
'test', 'func', 'c_func', 'struct', 'c_struct', 'opaque', 'union', 'enum',
|
||||
'distinct', 'alias', 'import', 'hide', 'return', 'try', 'catch', 'mut',
|
||||
'null', 'undefined', 'orelse', 'and', 'or', 'xor', 'if', 'while', 'for',
|
||||
'null', 'unreachable', 'undefined', 'orelse', 'and', 'or', 'xor', 'if', 'while', 'for',
|
||||
'expand', 'break', 'continue', 'defer', 'errdefer', 'yield', 'match', 'else',
|
||||
'true', 'false',
|
||||
'void', 'type', 'anyopaque', 'bool', 'int', 'uint', 'float', 'range',
|
||||
'void', 'noreturn', 'type', 'anyopaque', 'bool', 'int', 'uint', 'float', 'range',
|
||||
'i8', 'i16', 'i32', 'i64', 'u8', 'u16', 'u32', 'u64',
|
||||
'isize', 'usize', 'f32', 'f64',
|
||||
'c_char', 'c_schar', 'c_uchar', 'c_short', 'c_ushort',
|
||||
|
||||
Reference in New Issue
Block a user