diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-04 23:10:43 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-04 23:10:43 -0400 |
| commit | a4cb5ffafc050b519f806f74f0160ad48f76bee6 (patch) | |
| tree | 7a55f9b2e7c680eaccfa81c3734efdda71e848a3 /src/formatter | |
| parent | 4cb2ea78760fabcbf526dee5962a6bf4896639f3 (diff) | |
Deprecate `extend`
Diffstat (limited to 'src/formatter')
| -rw-r--r-- | src/formatter/formatter.c | 5 | ||||
| -rw-r--r-- | src/formatter/utils.c | 6 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/formatter/formatter.c b/src/formatter/formatter.c index 9ff328d0..41b1c4aa 100644 --- a/src/formatter/formatter.c +++ b/src/formatter/formatter.c @@ -116,7 +116,6 @@ OptionalText_t format_inline_code(ast_t *ast, Table_t comments) { /*inline*/ case StructDef: /*inline*/ case EnumDef: /*inline*/ case LangDef: - /*inline*/ case Extend: /*inline*/ case FunctionDef: /*inline*/ case ConvertDef: /*inline*/ case DebugLog: @@ -571,10 +570,6 @@ Text_t format_code(ast_t *ast, Table_t comments, Text_t indent) { DeclareMatch(def, ast, LangDef); return Texts("lang ", Text$from_str(def->name), format_namespace(def->namespace, comments, indent)); } - /*multiline*/ case Extend: { - DeclareMatch(extend, ast, Extend); - return Texts("lang ", Text$from_str(extend->name), format_namespace(extend->body, comments, indent)); - } /*multiline*/ case Defer: return Texts("defer ", format_namespace(Match(ast, Defer)->body, comments, indent)); /*multiline*/ case List: { diff --git a/src/formatter/utils.c b/src/formatter/utils.c index 9829df4b..ce2d30b5 100644 --- a/src/formatter/utils.c +++ b/src/formatter/utils.c @@ -70,8 +70,7 @@ CONSTFUNC int suggested_blank_lines(ast_t *first, ast_t *second) { case Lambda: case StructDef: case EnumDef: - case LangDef: - case Extend: return 1; + case LangDef: return 1; case Use: { if (second->tag != Use) return 1; break; @@ -104,8 +103,7 @@ CONSTFUNC int suggested_blank_lines(ast_t *first, ast_t *second) { case Lambda: case StructDef: case EnumDef: - case LangDef: - case Extend: return 1; + case LangDef: return 1; default: break; } return 0; |
