Repository URL to install this package:
|
Version:
1.6.6 ▾
|
XGo is the first AI-native programming language that integrates software engineering into a unified whole.
Key Characteristics:
When implementing new language syntax, follow this three-phase approach:
IMPORTANT: Each phase must be implemented in a separate pull request. Do NOT mix phases in a single PR. This separation ensures:
Scope: AST, parser, and printer modifications ONLY
ast/ directory (if needed - often existing nodes can be reused)parser/ directory to recognize the new syntaxprinter/ directoryparser/_testdata/ for new syntax
printer/_testdata/cl/ package - that belongs in Phase 2Scope: Code generation via cl package ONLY
github.com/goplus/gogen packagecl/_testgop/ covering various usage scenariosScope: User-facing documentation updates ONLY
doc/docs.md with practical examplesXGo maintains two levels of language specifications to serve different user needs:
doc/spec-mini.md - MiniSpec documentation in markdown formatdoc/spec/mini/mini.xgo - MiniSpec grammar definition in XGo TPL (EBNF-like) syntaxdoc/spec.md - FullSpec documentation in markdown formatWhen adding new syntax to XGo, you must determine whether it belongs in the MiniSpec or FullSpec:
Add to MiniSpec if the syntax:
Add to FullSpec only if the syntax:
Update Process:
doc/spec/mini/mini.xgo)github.com/goplus/gogen for robust Go AST generationgo fmt on any changed source files before committingparser/_testdata/cl/_testgop/ covering: