gkjohnson / xacro-parser

Utility for parsing and converting ROS Xacro files in Javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate parser and loader

gkjohnson opened this issue · comments

XacroParser

class XacroParser {
  constructor() {
    this.workingPath = '';
    this.inOrder = true;
    this.localProperties = true;
    this.requirePrefix = true;
    this.rospackCommands = {};
  }

  async getFileContents(path) {
    throw new Error('XacroParser: getFileContents() Not Implemented');
  }

  async parse(path) {
    // ...
    return { result, errors };
  }
}

XacroLoader

class XacroLoader extends XacroParser {
  constructor() {
    super();
    this.fetchOptions = { credentials: 'same-origin' };
  }

  async load(path) {}

  async parse(path, workingPath) {}

}