getAttributes()

in lib/generator.js [136:144]


  getAttributes(ast, name) {
    const attr = ast.attrs.find((item) => {
      return item.attrName.lexeme === name;
    });
    if (!attr) {
      return;
    }
    return attr.attrValue.string || attr.attrValue.lexeme || attr.attrValue.value;
  }