Package com.scriptbasic.syntax
Class BasicProgram
java.lang.Object
com.scriptbasic.syntax.AbstractBasicProgramPostprocessing
com.scriptbasic.syntax.BasicProgram
- All Implemented Interfaces:
BuildableProgram,Program
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(Command command) Add a new command to the list of commands.protected CommandgetNamedCommand(String name) protected Map<String, CommandSub> voidreset()Calling this method will remove all previously built code from the program.Methods inherited from class com.scriptbasic.syntax.AbstractBasicProgramPostprocessing
getStartCommand, postprocess
-
Constructor Details
-
BasicProgram
public BasicProgram()
-
-
Method Details
-
reset
public void reset()Description copied from interface:BuildableProgramCalling this method will remove all previously built code from the program. This method should be called if the sameBuildableProgramobject is used to execute different programs, one after the other.Without calling this method the program would be concatenated and the second execution would contain the program codes of the first program and after that the second.
-
addCommand
Description copied from interface:BuildableProgramAdd a new command to the list of commands.- Parameters:
command- parameter
-
getFirstCommand
- Specified by:
getFirstCommandin classAbstractBasicProgramPostprocessing
-
getCommands
-
getNamedCommandNames
-
getSubroutineMap
- Specified by:
getSubroutineMapin classAbstractBasicProgramPostprocessing- Returns:
- the subroutineMap
-
getNamedCommand
-