diff --git a/App/lib/core/Gen/MatchGenMixin.vp b/App/lib/core/Gen/MatchGenMixin.vp index d02d4ef..b2ea532 100644 --- a/App/lib/core/Gen/MatchGenMixin.vp +++ b/App/lib/core/Gen/MatchGenMixin.vp @@ -301,6 +301,7 @@ novirtual class MatchGenMixin: if vnm is None: return 0 if string.strcmp(vnm, "Some") == 0: return 1 if string.strcmp(vnm, "Nil") == 0: return 2 + if k == ast.ASTKind.MatchSingleton: return 2 return 0 def _match_has_opt_pattern(self, node: ast.Match*) -> int: diff --git a/App/lib/lsp/LspSemantic.vp b/App/lib/lsp/LspSemantic.vp index ba649e3..eb5f157 100644 --- a/App/lib/lsp/LspSemantic.vp +++ b/App/lib/lsp/LspSemantic.vp @@ -535,6 +535,8 @@ def _LexStream(pool: memhub.MemManager*, typ = ST_NUMBER elif tok.type == ast.TokenType.Name and tok.str_val is not None and string.strcmp(tok.str_val, "own") == 0: typ = ST_KEYWORD + elif tok.type == ast.TokenType.Name and tok.str_val is not None and string.strcmp(tok.str_val, "None") == 0: + typ = ST_KEYWORD elif tok.type == ast.TokenType.Name and tok.str_val is not None and string.strcmp(tok.str_val, "Some") == 0: typ = ST_CLASS elif tok.type == ast.TokenType.Name and tok.str_val is not None and string.strcmp(tok.str_val, "Nil") == 0: