Methods
parseCommand(iterator, opt)
This method parses a command (like MOV, PUSH, ...) => generates AST for these commands. if it does not know the command it raises a syntax error.
If the command + parameter definition is not unique parseCommand takes the first hit, so keep this in mind.
Parameters:
| Name | Type | Description |
|---|---|---|
iterator |
||
opt |
If this is true, no error is rised if the current token is no command. Default is false. |
- Source:
parseDirective(iterator)
This method parses ALL THE directives!
Parameters:
| Name | Type | Description |
|---|---|---|
iterator |
- Source:
parseLabel(iterator, opt)
This method parses a label (myLabel: ) => only syntactical correctness
Parameters:
| Name | Type | Description |
|---|---|---|
iterator |
||
opt |
If this is true, no error is rised if the current token is no command. Default is false. |
- Source:
pass(assembler, input) → {*}
This function does all the parsing magic
Parameters:
| Name | Type | Description |
|---|---|---|
assembler |
||
input |
- Source:
Returns:
- Type
- *