Merge pull request #1075 from xushiwei/t

go/parser demo
This commit is contained in:
xushiwei
2025-04-28 00:46:00 +08:00
committed by GitHub
4 changed files with 15 additions and 1 deletions

View File

@@ -335,6 +335,7 @@ Here are the Go packages that can be imported correctly:
* [regexp/syntax](https://pkg.go.dev/regexp/syntax) * [regexp/syntax](https://pkg.go.dev/regexp/syntax)
* [go/token](https://pkg.go.dev/go/token) * [go/token](https://pkg.go.dev/go/token)
* [go/scanner](https://pkg.go.dev/go/scanner) * [go/scanner](https://pkg.go.dev/go/scanner)
* [go/parser](https://pkg.go.dev/go/parser)
## Dependencies ## Dependencies

2
go.mod
View File

@@ -7,7 +7,7 @@ toolchain go1.24.1
require ( require (
github.com/goplus/gogen v1.17.2 github.com/goplus/gogen v1.17.2
github.com/goplus/lib v0.2.0 github.com/goplus/lib v0.2.0
github.com/goplus/llgo/runtime v0.0.0-20250403035532-0a8a4eb6a653 github.com/goplus/llgo/runtime v0.0.0-00010101000000-000000000000
github.com/goplus/llvm v0.8.3 github.com/goplus/llvm v0.8.3
github.com/goplus/mod v0.16.0 github.com/goplus/mod v0.16.0
github.com/qiniu/x v1.13.19 github.com/qiniu/x v1.13.19

View File

@@ -0,0 +1,13 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package runtime
// Compiler is the name of the compiler toolchain that built the
// running binary. Known toolchains are:
//
// - gc Also known as cmd/compile.
// - gccgo The gccgo front end, part of the GCC compiler suite.
// - llgo Our proect
const Compiler = "llgo"