Repository navigation
v0.0.17
v0.0.17
Replace the hand-rolled source scanner with gopapy/v2 as the parser.
compiler.Compile now calls parser2.ParseFile from
github.com/tamnd/gopapy/v2 and walks the resulting AST via the new
classifyAST function. All 88 oracle fixtures remain byte-identical.
One intentional behaviour change: raw-string literals (r"hi") used as
module docstrings are accepted. gopapy parses them identically to plain
strings; the produced bytecode is correct and byte-identical to CPython.
Files changed
go.mod/go.sum: addgithub.com/tamnd/gopapy/v2 v2.0.0.compiler/classify_ast.go(new):classifyAST,extractValue,
constantToValue,augOpargFromOp.compiler/classify.go: remove all hand-scanner functions; keep types,
utility functions, andstmtsToClassification.compiler/compiler.go: updateCompileto useparser2.ParseFile
andclassifyAST; update package doc.compiler/compiler_test.go: dropraw_stringfrom the rejected list.cmd/gocopy/main.go: version bumped to0.0.17.