function takeIdentifier(tokenStream) {
    if (tokenStream.length == 0)
      throw new Error('Expected an identifier, but found end-of-stream.');
    var token = tokenStream.shift();
    if (!token.match(/^[a-zA-Z0-9.-]+$/))
      throw new Error('Expected an identifier, but found "' + token + '".');
    return token;
  }
/**
   * Consumes from the stream an identifier, returning its value (as a string).
   */
Consumes from the stream an identifier, returning its value (as a string).
Consumes from the stream an identifier returning its value ( as a string ) .
function takeIdentifier(tokenStream) {
    if (tokenStream.length == 0)
      throw new Error('Expected an identifier, but found end-of-stream.');
    var token = tokenStream.shift();
    if (!token.match(/^[a-zA-Z0-9.-]+$/))
      throw new Error('Expected an identifier, but found "' + token + '".');
    return token;
  }
function takeIdentifier ( tokenStream ) { if ( tokenStream . length == 0 ) throw new Error ( 'Expected an identifier, but found end-of-stream.' ) ; var token = tokenStream . shift ( ) ; if ( ! token . match ( / ^[a-zA-Z0-9.-]+$ / ) ) throw new Error ( 'Expected an identifier, but found "' + token + '".' ) ; return token ; }
Consumes from the stream an identifier, returning its value (as a string).
Consumes from the stream an identifier returning its value ( as a string ) .