挺大的改动。增加 as运算符,转换不了抛出 TypeError。import语法更新。修复try一点错误。现在表达式运算返回ExprResult。通过3个宏实现简便错误传播与解包 unwrap

This commit is contained in:
2026-02-04 18:14:30 +08:00
parent 27cf09cad0
commit b98c1b7dd8
26 changed files with 693 additions and 206 deletions

View File

@@ -57,7 +57,7 @@
"patterns": [
{
"name": "keyword.control.fig",
"match": "\\b(and|or|not|import|func|var|const|final|while|for|if|else|new|struct|interface|impl|public|return|break|continue|try|catch|throw)\\b"
"match": "\\b(and|or|not|import|func|var|const|final|while|for|if|else|new|struct|interface|impl|public|return|break|continue|try|catch|throw|is|as)\\b"
},
{ "name": "constant.language.fig", "match": "\\b(true|false|null)\\b" }
]
@@ -78,7 +78,7 @@
},
{
"name": "keyword.operator.comparison.fig",
"match": "(==|!=|<=|>=|<|>|is)"
"match": "(==|!=|<=|>=|<|>)"
},
{
"name": "punctuation.separator.fig",