alpha-language-supportAlpha Language Support was created to help write scripts using the alpha language. Alpha scripts must have the .al extention FeaturesAlpha Language Support currently supports:
Syntax AnalysisThe syntax analyser is activated upon file save and the file is parsed. Error messages can be examined in the Output Alpha panel (see View Parse Output on how to open the Output panel). The messages are not very accurate but they provide a line number to help with debugging. The parser can also be activated using the Parse Grammar command. To use the command,
The parsing results will be displayed in the Output panel Compile and Run VMTo compile and run an alpha script,
This will compile the active alpha file and produce a .abc file with the same name as the active file. Error messages from the compiler will be displayed in the Output panel (see View Parse Output on how to open the Output panel). The vm runs on a terminal (tested on powershell) and the output is displayed there. You can also run an alpha script using F5, to do that
Your launch.json should look like this. You can suppress runtime warnings by adding a -Wno argument. View Parse OutputTo view the output of the parser go to View -> Output (or Ctrl+Shift+U) and select the Alpha panel Alpha SyntaxTypesA variable in alpha can be one of the following types:
String
Number
Boolean
Nil
TableIn alpha you can define tables by index or key-value pairs.
Objects with the key "()" can be called as a function
Using the '..' operator you can pass the table as the first argument in a function call
Function
In alpha a function can be called in three ways:
Undefined
|