Runtime: add method dispatch for array/string/dict/number (.len, .push, .pop, .keys, .values, .has, .toInt) Stdlib: delete global len/push/pop/keys/values/has Tests/docs/examples: migrate to method style; add tests/test_builtin_methods_style.bob All tests pass Breaking: global len/push/pop/keys/values/has removed; use methods instead Parser/AST: add class/extends/extension/super, field initializers Runtime: shared methods with this injection; classParents/classTemplates; super resolution; ownerClass/currentClass; extension lookup order Builtins: method dispatch for array/string/dict/number (.len/.push/.pop/.keys/.values/.has/.toInt); remove global forms Tests/docs/examples: add/refresh for classes, inheritance, super, polymorphism; migrate to method style; all tests pass VS Code extension: update grammar/readme/snippets for new features
35 lines
794 B
JSON
35 lines
794 B
JSON
{
|
|
"comments": {
|
|
"lineComment": "//",
|
|
"blockComment": ["/*", "*/"]
|
|
},
|
|
"brackets": [
|
|
["{", "}"],
|
|
["[", "]"],
|
|
["(", ")"]
|
|
],
|
|
"autoClosingPairs": [
|
|
{ "open": "{", "close": "}" },
|
|
{ "open": "[", "close": "]" },
|
|
{ "open": "(", "close": ")" },
|
|
{ "open": "\"", "close": "\"", "notIn": ["string"] },
|
|
{ "open": "'", "close": "'", "notIn": ["string"] }
|
|
],
|
|
"surroundingPairs": [
|
|
["{", "}"],
|
|
["[", "]"],
|
|
["(", ")"],
|
|
["\"", "\""],
|
|
["'", "'"]
|
|
],
|
|
"indentationRules": {
|
|
"increaseIndentPattern": "\\{[^}]*$|\\b(func|if|else|while|for|class|extension)\\b.*$",
|
|
"decreaseIndentPattern": "^\\s*[})]"
|
|
},
|
|
"folding": {
|
|
"markers": {
|
|
"start": "^\\s*//\\s*#?region\\b",
|
|
"end": "^\\s*//\\s*#?endregion\\b"
|
|
}
|
|
}
|
|
} |