Skip to content

Question: Using functor to store position information #176

@Centril

Description

@Centril

According to bnfc --help:
--functor Make the AST a functor and use it to store the position of the nodes

How would you go about storing the position of the nodes?
The type that

parseProgram = pProgram . myLexer

yields is:

parseProgram :: String -> Err (Program ())

I.e: no position information is added... So does that mean that you have to use something else than happy, or can you get it to add that position information for you?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions