Lots of work on the parser including testing interface
This commit is contained in:
17
app/imports/parser/parseTree/RollArrayNode.js
Normal file
17
app/imports/parser/parseTree/RollArrayNode.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import ParseNode from '/imports/parser/parseTree/ParseNode.js';
|
||||
|
||||
export default class RollArrayNode extends ParseNode {
|
||||
constructor({values}) {
|
||||
super();
|
||||
this.values = values;
|
||||
}
|
||||
compile(){
|
||||
return this;
|
||||
}
|
||||
toString(){
|
||||
return `[${this.values.join(', ')}]`;
|
||||
}
|
||||
reduce(){
|
||||
//TODO sum and return values
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user