wiseService/wiseSource.js
/**
   * Parse a field definition line and call the addField or addView as needed
   * @param {string} line - the line to parse
   */
Parse a field definition line and call the addField or addView as needed
@param {string} line - the line to parse
Parse a field definition line and call the addField or addView as needed @param { string } line - the line to parse
parseFieldDef (line) {
    if (line[0] === '#') {
      line = line.substring(1);
    }
    if (line.lastIndexOf('field:', 0) === 0) {
      const pos = this.api.addField(line);
      const match = line.match(/shortcut:([^;]+)/);
      if (match) {
        this.shortcuts[match[1]] = { pos: pos, mod: 0 };
        const kind = line.match(/kind:([^;]+)/);
        if (kind) {
          if (kind[1] === 'lotermfield') {
            this.shortcuts[match[1]].mod = 1;
          } else if (kind[1] === 'uptermfield') {
            this.shortcuts[match[1]].mod = 2;
          }
        }
      }
    } else if (line.lastIndexOf('view:', 0) === 0) {
      this.view += line.substring(5) + '\n';
    }
  }
parseFieldDef ( line ) { if ( line [ 0 ] === '#' ) { line = line . substring ( 1 ) ; } if ( line . lastIndexOf ( 'field:' , 0 ) === 0 ) { const pos = this . api . addField ( line ) ; const match = line . match ( / shortcut:([^;]+) / ) ; if ( match ) { this . shortcuts [ match [ 1 ] ] = { pos : pos , mod : 0 } ; const kind = line . match ( / kind:([^;]+) / ) ; if ( kind ) { if ( kind [ 1 ] === 'lotermfield' ) { this . shortcuts [ match [ 1 ] ] . mod = 1 ; } else if ( kind [ 1 ] === 'uptermfield' ) { this . shortcuts [ match [ 1 ] ] . mod = 2 ; } } } } else if ( line . lastIndexOf ( 'view:' , 0 ) === 0 ) { this . view += line . substring ( 5 ) + '\n' ; } }
Parse a field definition line and call the addField or addView as needed
 @param {string} line - the line to parse
Parse a field definition line and call the addField or addView as needed @param { string } line - the line to parse