fix: restore iota blocks, asm --format flag and prose after the syntax pass
This commit is contained in:
@@ -26,7 +26,7 @@ Repository: [sourcedock.dev/petrbalvin/gasm-devkit](https://sourcedock.dev/petrb
|
||||
graph TD
|
||||
SRC["source .s"] --> LEX["lexer<br/>token stream"]
|
||||
LEX --> PAR["parser<br/>AST + diagnostics"]
|
||||
LEX --> FMT["format<br/>re-space tokens"]
|
||||
LEX --> FMT["s<br/>re-space tokens"]
|
||||
PAR --> LINT["lint<br/>static checks"]
|
||||
PAR --> LSP["lsp server"]
|
||||
LEX --> LSP
|
||||
@@ -157,7 +157,7 @@ Two deeper analyses sit on top of the AST:
|
||||
reference) and a literal index is range-checked; a named index constant such
|
||||
as `$PCDATA_StackMapIndex` is accepted without a range check.
|
||||
|
||||
### `format`
|
||||
### `s`
|
||||
|
||||
The formatter works on the **token stream, not the AST**, so it preserves
|
||||
every line — comments and blanks included. It normalises indentation, operand
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ why, the options on the table, and the trigger that should reopen it.
|
||||
**Approach taken.** Instead of parsing the compiler's iexport data (which
|
||||
would have required either `golang.org/x/tools` or an in-house parser), the
|
||||
resolver reads the **GOOBJ data directly** from the target package's `.a`
|
||||
archive. The `.a` file contains a `_go_.o` member whose GOOBJ format is the
|
||||
archive. The `.a` file contains a `_go_.o` member whose GOOBJ s is the
|
||||
same one gasm writes — the parser reuses the same layout (`blkSymdef`,
|
||||
`blkNonpkgdef`, the string table), so no new dependency was needed.
|
||||
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ ast/ Abstract syntax tree
|
||||
parser/ Line-oriented parser
|
||||
arch/ Register and instruction tables (generated)
|
||||
lint/ Static analysis rules
|
||||
format/ Canonical formatter
|
||||
s/ Canonical formatter
|
||||
lsp/ Language Server Protocol server
|
||||
asm/ Standalone assembler, encoder, object emitters
|
||||
verify/ JIT execution, differential testing, ABI checks
|
||||
|
||||
Reference in New Issue
Block a user