repos / gbc

GBC - Go B Compiler
git clone https://github.com/xplshn/gbc.git

commit
8d95dbc
parent
1c7a017
author
xplshn
date
2025-08-24 02:51:53 +0000 UTC
config.go: change defaults

Signed-off-by: xplshn <[email protected]>
1 files changed,  +26, -26
M pkg/config/config.go
+26, -26
 1@@ -108,37 +108,37 @@ func NewConfig() *Config {
 2 	}
 3 
 4 	features := map[Feature]Info{
 5-		FeatExtrn:              {"extrn", true, "Allow the 'extrn' keyword."},
 6-		FeatAsm:                {"asm", true, "Allow `__asm__` blocks for inline assembly."},
 7-		FeatBEsc:               {"b-esc", false, "Recognize B-style '*' character escapes."},
 8-		FeatCEsc:               {"c-esc", true, "Recognize C-style '\\' character escapes."},
 9-		FeatBOps:               {"b-ops", false, "Recognize B-style assignment operators like '=+'."},
10-		FeatCOps:               {"c-ops", true, "Recognize C-style assignment operators like '+='."},
11-		FeatCComments:          {"c-comments", true, "Recognize C-style '//' line comments."},
12-		FeatTyped:              {"typed", true, "Enable the Bx opt-in & backwards-compatible type system."},
13-		FeatShortDecl:          {"short-decl", true, "Enable Bx-style short declaration `:=`."},
14-		FeatBxDeclarations:     {"bx-decl", true, "Enable Bx-style `auto name = val` declarations."},
15+		FeatExtrn:              {"extrn",               true, "Allow the 'extrn' keyword."},
16+		FeatAsm:                {"asm",                 true, "Allow `__asm__` blocks for inline assembly."},
17+		FeatBEsc:               {"b-esc",               false,"Recognize B-style '*' character escapes."},
18+		FeatCEsc:               {"c-esc",               true, "Recognize C-style '\\' character escapes."},
19+		FeatBOps:               {"b-ops",               false,"Recognize B-style assignment operators like '=+'."},
20+		FeatCOps:               {"c-ops",               true, "Recognize C-style assignment operators like '+='."},
21+		FeatCComments:          {"c-comments",          true, "Recognize C-style '//' line comments."},
22+		FeatTyped:              {"typed",               true, "Enable the Bx opt-in & backwards-compatible type system."},
23+		FeatShortDecl:          {"short-decl",          true, "Enable Bx-style short declaration `:=`."},
24+		FeatBxDeclarations:     {"bx-decl",             true, "Enable Bx-style `auto name = val` declarations."},
25 		FeatAllowUninitialized: {"allow-uninitialized", true, "Allow declarations without an initializer (`var;` or `auto var;`)."},
26-		FeatStrictDecl:         {"strict-decl", false, "Require all declarations to be initialized."},
27-		FeatContinue:           {"continue", true, "Allow the Bx keyword `continue` to be used."},
28-		FeatNoDirectives:       {"no-directives", false, "Disable `// [b]:` directives."},
29+		FeatStrictDecl:         {"strict-decl",         false,"Require all declarations to be initialized."},
30+		FeatContinue:           {"continue",            true, "Allow the Bx keyword `continue` to be used."},
31+		FeatNoDirectives:       {"no-directives",       false,"Disable `// [b]:` directives."},
32 	}
33 
34 	warnings := map[Warning]Info{
35-		WarnCEsc:               {"c-esc", true, "Warn on usage of C-style '\\' escapes."},
36-		WarnBEsc:               {"b-esc", true, "Warn on usage of B-style '*' escapes."},
37-		WarnBOps:               {"b-ops", true, "Warn on usage of B-style assignment operators like '=+'."},
38-		WarnCOps:               {"c-ops", true, "Warn on usage of C-style assignment operators like '+='."},
39-		WarnUnrecognizedEscape: {"u-esc", true, "Warn on unrecognized character escape sequences."},
40-		WarnTruncatedChar:      {"truncated-char", true, "Warn when a character escape value is truncated."},
41+		WarnCEsc:               {"c-esc",           false,"Warn on usage of C-style '\\' escapes."},
42+		WarnBEsc:               {"b-esc",           true, "Warn on usage of B-style '*' escapes."},
43+		WarnBOps:               {"b-ops",           true, "Warn on usage of B-style assignment operators like '=+'."},
44+		WarnCOps:               {"c-ops",           false,"Warn on usage of C-style assignment operators like '+='."},
45+		WarnUnrecognizedEscape: {"u-esc",           true, "Warn on unrecognized character escape sequences."},
46+		WarnTruncatedChar:      {"truncated-char",  true, "Warn when a character escape value is truncated."},
47 		WarnLongCharConst:      {"long-char-const", true, "Warn when a multi-character constant is too long for a word."},
48-		WarnCComments:          {"c-comments", false, "Warn on usage of non-standard C-style '//' comments."},
49-		WarnOverflow:           {"overflow", true, "Warn when an integer constant is out of range for its type."},
50-		WarnPedantic:           {"pedantic", false, "Issue all warnings demanded by the strict standard."},
51-		WarnUnreachableCode:    {"unreachable-code", true, "Warn about code that will never be executed."},
52-		WarnImplicitDecl:       {"implicit-decl", true, "Warn about implicit function or variable declarations."},
53-		WarnType:               {"type", true, "Warn about type mismatches in expressions and assignments."},
54-		WarnExtra:              {"extra", true, "Enable extra miscellaneous warnings."},
55+		WarnCComments:          {"c-comments",      false,"Warn on usage of non-standard C-style '//' comments."},
56+		WarnOverflow:           {"overflow",        true, "Warn when an integer constant is out of range for its type."},
57+		WarnPedantic:           {"pedantic",        false,"Issue all warnings demanded by the strict standard."},
58+		WarnUnreachableCode:    {"unreachable-code",true, "Warn about code that will never be executed."},
59+		WarnImplicitDecl:       {"implicit-decl",   true, "Warn about implicit function or variable declarations."},
60+		WarnType:               {"type",            true, "Warn about type mismatches in expressions and assignments."},
61+		WarnExtra:              {"extra",           true,  "Enable extra miscellaneous warnings."},
62 	}
63 
64 	cfg.Features, cfg.Warnings = features, warnings