|
@@ -15,6 +15,7 @@ import { Case } from './case';
|
|
|
import { SysCall } from './sysCall';
|
|
import { SysCall } from './sysCall';
|
|
|
import { FormalParameter } from './formalParameter';
|
|
import { FormalParameter } from './formalParameter';
|
|
|
import { FunctionCall } from './../expressions/functionCall'; //Proxy to expression since they do exatcly the same thing
|
|
import { FunctionCall } from './../expressions/functionCall'; //Proxy to expression since they do exatcly the same thing
|
|
|
|
|
+import { Command } from './command';
|
|
|
|
|
|
|
|
export {
|
|
export {
|
|
|
Break,
|
|
Break,
|
|
@@ -34,4 +35,24 @@ export {
|
|
|
SysCall,
|
|
SysCall,
|
|
|
FormalParameter,
|
|
FormalParameter,
|
|
|
FunctionCall
|
|
FunctionCall
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+export class Comment extends Command {
|
|
|
|
|
+ constructor (text, isInline = false, parentCommand = null) {
|
|
|
|
|
+ super();
|
|
|
|
|
+
|
|
|
|
|
+ this.type = "comment";
|
|
|
|
|
+ this.comment_text = text;
|
|
|
|
|
+ this.comment = text;
|
|
|
|
|
+ this.value = text;
|
|
|
|
|
+ this._text = text;
|
|
|
|
|
+
|
|
|
|
|
+ this.isInline = isInline;
|
|
|
|
|
+ this.parentCommand = parentCommand;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ static isInlineComment (comment) {
|
|
|
|
|
+ return comment && comment.isInline === true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
};
|
|
};
|