Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goast: expression #9

Open
Konstantin8105 opened this issue Jan 29, 2019 · 1 comment
Open

goast: expression #9

Konstantin8105 opened this issue Jan 29, 2019 · 1 comment

Comments

@Konstantin8105
Copy link
Contributor

Konstantin8105 commented Jan 29, 2019

Hello @yuroyoro!
Now, you server create AST from Go source.
Is possible add parsing string to Go AST expression?

Result of next example is AST of expression d*6*integer(r*8+ff,12,3):

package main

import (
	"go/ast"
	"go/parser"
	"go/token"
)

func main() {
	a, _ := parser.ParseExpr("d*6*integer(r*8+ff,12,3)")
	ast.Print(token.NewFileSet(), a)
}
@Konstantin8105
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant