diff --git a/self_hosted/parser.jou b/self_hosted/parser.jou index 5de50d04..e3f8bfa3 100644 --- a/self_hosted/parser.jou +++ b/self_hosted/parser.jou @@ -201,6 +201,7 @@ class Parser: def parse_type(self) -> AstType: if not ( self->tokens->kind == TokenKind::Name + or self->tokens->is_keyword("None") or self->tokens->is_keyword("void") or self->tokens->is_keyword("noreturn") or self->tokens->is_keyword("short") diff --git a/self_hosted/parses_wrong.txt b/self_hosted/parses_wrong.txt new file mode 100644 index 00000000..05a0c544 --- /dev/null +++ b/self_hosted/parses_wrong.txt @@ -0,0 +1,2 @@ +tests/syntax_error/assign_to_None.jou +tests/syntax_error/None_as_value.jou diff --git a/self_hosted/runs_wrong.txt b/self_hosted/runs_wrong.txt index 4e9c16e6..96e30101 100644 --- a/self_hosted/runs_wrong.txt +++ b/self_hosted/runs_wrong.txt @@ -45,3 +45,7 @@ tests/wrong_type/index.jou stdlib/ascii.jou tests/should_succeed/ascii_test.jou stdlib/_macos_startup.jou +tests/should_succeed/if_WINDOWS_at_runtime.jou +tests/should_succeed/return_none.jou +tests/syntax_error/assign_to_None.jou +tests/syntax_error/None_as_value.jou