add initial marp implementation with sample content and build configuration
This commit is contained in:
23
node_modules/speech-rule-engine/mjs/semantic_tree/semantic_parser.js
generated
vendored
Normal file
23
node_modules/speech-rule-engine/mjs/semantic_tree/semantic_parser.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import { SemanticNodeFactory } from './semantic_node_factory.js';
|
||||
export class SemanticAbstractParser {
|
||||
constructor(type) {
|
||||
this.type = type;
|
||||
this.factory_ = new SemanticNodeFactory();
|
||||
}
|
||||
getFactory() {
|
||||
return this.factory_;
|
||||
}
|
||||
setFactory(factory) {
|
||||
this.factory_ = factory;
|
||||
}
|
||||
getType() {
|
||||
return this.type;
|
||||
}
|
||||
parseList(list) {
|
||||
const result = [];
|
||||
for (let i = 0, element; (element = list[i]); i++) {
|
||||
result.push(this.parse(element));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user