Package mars.assembler.token
Class SourceLine
java.lang.Object
mars.assembler.token.SourceLine
Handy class to represent, for a given line of source code, the code
 itself, the program containing it, and its line number within that program.
 This is used to separately keep track of the original file/position of
 a given line of code.  When 
.include is used, it will migrate to a different
 line and possibly different program but the migration should not be visible to the user.- 
Constructor SummaryConstructorsConstructorDescriptionSourceLine(SourceLocation location, String content, List<Token> tokens) Create a newSourceLinewith the given information.SourceLine(SourceLocation location, String content, List<Token> tokens, SourceLine originalLine) Create a new macro expansionSourceLinewith the given information.
- 
Method SummaryModifier and TypeMethodDescriptionGet the raw source code of the line.Get the location of this line in the source code.Get the line in the macro definition or included file that this line was created from, if applicable.Get the list of tokens that the line contains.voidsetContent(String content) voidsetLocation(SourceLocation location) voidsetOriginalLine(SourceLine originalLine) 
- 
Constructor Details- 
SourceLineCreate a newSourceLinewith the given information.- Parameters:
- location- The location of the line in the source code.
- content- The raw source code of the line.
- tokens- The list of tokens that the line contains.
 
- 
SourceLinepublic SourceLine(SourceLocation location, String content, List<Token> tokens, SourceLine originalLine) Create a new macro expansionSourceLinewith the given information.- Parameters:
- location- The location of the line in the source code.
- content- The raw source code of the line.
- tokens- The list of tokens that the line contains.
- originalLine- The line in the macro definition or included file that this line was created from.
 
 
- 
- 
Method Details- 
getLocationGet the location of this line in the source code.- Returns:
- The line location.
 
- 
setLocation
- 
getContentGet the raw source code of the line.- Returns:
- The line content.
 
- 
setContent
- 
getTokensGet the list of tokens that the line contains.- Returns:
- The token list.
 
- 
getOriginalLineGet the line in the macro definition or included file that this line was created from, if applicable.- Returns:
- The original line if this line is part of a macro expansion or included file,
         or nullotherwise.
 
- 
setOriginalLine
 
-