Skip to content

i need some yaegi's design or Structural doc ? #1507

Answered by mvertes
kevinleegithup asked this question in Q&A
Discussion options

You must be logged in to vote

@kevinleegithup you are asking hard questions 😄

why rewrite ast again not use golang's ast?

When I started this interpreter project, I was first very happy to see that the Golang authors included a full Go parser and some AST (Abstract Syntax Tree) tooling in the standard library but then I found it too cumbersome to use, and not suitable to my purposes. Even walking the tree was strange and inefficient to me. At that time I was fluent in C, but still beginning and poor at Go, and could not fit my design into theirs, with all the interface intricacies. So I decided to still use their parser, but convert their AST representation to mine, the node struct.

In my approach, the AST nodes are…

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@kevinleegithup
Comment options

@kevinleegithup
Comment options

@kevinleegithup
Comment options

Answer selected by mvertes
Comment options

You must be logged in to vote
1 reply
@metaleap
Comment options

Comment options

You must be logged in to vote
1 reply
@mvertes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants