Branch: Tag:

2016-05-25

2016-05-25 17:19:19 by Per Hedbor <ph@opera.com>

Updated Parser.Pike.tokenize

It now supports <x>bit, `** and the "new" getter/setter syntax.

65:    if(data[pos]=='-' || data[pos]=='+') pos++;    while(data[pos]>='0' && data[pos]<='9') pos++;    } +  if(data[pos]=='b') +  { +  pos++; +  if(data[pos]=='i') +  pos++; +  if(data[pos]=='t') +  pos++; +  }    if( pos != len )    pos--;    break;       case '`':    if(data[pos+1]=='`') pos++; -  +  if(m_isidchar(data[pos+1])) +  { +  do { +  pos++; +  } while(m_isidchar(data[pos+1])); +  if(data[pos+1] == '=') +  pos++; +  break; +  // NOTE: Depends on string having null at end. +  }    switch(data[pos+1]) {    case '<':    case '>':
94:    case '/': case '%': case '*': case '&': case '|':    case '^': case '+': case '!': case '=': case '~':    pos++; +  if(data[pos+1] == '*') +  pos++;    break;    }    if(data[pos+1]=='=') pos++;