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

Pragmas #167

Closed
4 tasks done
degory opened this issue Jul 12, 2020 · 0 comments · Fixed by #170
Closed
4 tasks done

Pragmas #167

degory opened this issue Jul 12, 2020 · 0 comments · Fixed by #170

Comments

@degory
Copy link
Owner

degory commented Jul 12, 2020

Add support for pragmas.

Full support would integrate with/interoperate with DotNET attributes, but that's not needed for bootstrap.

Pragma syntax should resemble a simplified function call prefixed with @. Parameters can be limited to literal strings, numbers, booleans, and enum members. For example:

@Ghul.Compiler.output("test.il")

Required:

  • Parse tree nodes
  • Parser
  • Way to attach one or more pragmas to definition and statement parse tree nodes
  • Way to wire up a pragma name to a corresponding pragma implementation that can see all instances of its pragma in the program source (can be semi-hardwired for now, e.g. a Dict of strings mapping to implementing class instances)
@degory degory added this to the dotnet-core-bootstrap milestone Jul 12, 2020
@degory degory linked a pull request Jul 13, 2020 that will close this issue
@degory degory removed a link to a pull request Jul 13, 2020
@degory degory linked a pull request Jul 14, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant