Adding New Keywords
1. Update the Parser
parseNewKeyword :: PU.Parser AT.Expr
parseNewKeyword = do
srcLoc <- PU.parseSrcLoc
_ <- PU.symbol "newkeyword"
-- Add parsing logic for the new keyword
-- For example:
expr <- parseExpr
return $ AT.NewKeyword srcLoc exprparseTerm :: PU.Parser AT.Expr
parseTerm =
M.choice
[ -- ... existing choices ...
, parseNewKeyword
, parseParenExpr
]2. Extend the AST
3. Implement Semantic Analysis
4. Add Code Generation
5. Update Error Handling
6. Modify Utility Functions
7. Add Tests
8. Update Documentation
Last updated