Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 400
    • Issues 400
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Wiki
  • Tutorials
  • adding a pragma

adding a pragma · Changes

Page history
Add `adding a pragma` authored Jun 05, 2025 by Quinten Cabo's avatar Quinten Cabo
Hide whitespace changes
Inline Side-by-side
tutorials/adding-a-pragma.md 0 → 100644
View page @ a23cdd4a
1. Add a flag or atribute to the `Pragma` node in `ast.xml`
2. Adjust the `handle_pagma` function in `parser.c` to handle your pragma.
3. *Optional:* Add a new call to handle pragma somewhere in the parser. You should probably extend the `pragma_type` enum if you do this.
4. Adjust the `PRTpragma` function in `print.c`
5. Actually use your pragma.
If you add pragma to a new node eactually add a Pragma son to that node instead of reading out the parsed Pragma node, taking what you need and freeing it.
Clone repository
  • Styleguide
  • concepts
    • Deprecated Modules
    • Globals
    • Intermediate Code Macros
    • Named Tuples
    • Overloading
    • Preprocessor
    • Primitive functions
    • Runtime Representations
    • input stdin
    • phm xt
    • ref counting methods
    • type famlies
    • type patterns
  • error messages
    • Anthropomorphic error essages
View All Pages