How to use the edgedb.lang.common.lang.javascript.parser.js.Token function in edgedb

To help you get started, we’ve selected a few edgedb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
class T_SEMICOLON(Token):
    pass

class T_COLON(Token):
    pass

class T_COMMA(Token):
    pass

class T_DOT(Token):
    pass

class T_LPAREN(Token):
    pass

class T_RPAREN(Token):
    pass

class T_LSBRACKET(Token):
    pass

class T_RSBRACKET(Token):
    pass

class T_LCBRACKET(Token):
    pass

class T_RCBRACKET(Token):
    pass

class T_ID(Token):
    pass
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
class T_LOGICOR(Token, lextoken='||'):
    pass

class T_QUESTION(Token, lextoken='?'):
    pass

class T_PLUSPLUS(Token, lextoken='++'):
    pass

class T_MINUSMINUS(Token, lextoken='--'):
    pass

class T_LEFTSHIFT(Token, lextoken='<<'):
    pass

class T_SIGNRIGHTSHIFT(Token, lextoken='>>'):
    pass

class T_ZERORIGHTSHIFT(Token, lextoken='>>>'):
    pass

class T_EQUAL(Token, lextoken='=='):
    pass

class T_NOTEQUAL(Token, lextoken='!='):
    pass

class T_STRICTEQUAL(Token, lextoken='==='):
    pass

class T_STRICTNOTEQUAL(Token, lextoken='!=='):
    pass
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
class T_COLON(Token):
    pass

class T_COMMA(Token):
    pass

class T_DOT(Token):
    pass

class T_LPAREN(Token):
    pass

class T_RPAREN(Token):
    pass

class T_LSBRACKET(Token):
    pass

class T_RSBRACKET(Token):
    pass

class T_LCBRACKET(Token):
    pass

class T_RCBRACKET(Token):
    pass

class T_ID(Token):
    pass

class T_STRING(Token):
    pass
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
class T_LOGICAND(Token, lextoken='&&'):
    pass

class T_LOGICOR(Token, lextoken='||'):
    pass

class T_QUESTION(Token, lextoken='?'):
    pass

class T_PLUSPLUS(Token, lextoken='++'):
    pass

class T_MINUSMINUS(Token, lextoken='--'):
    pass

class T_LEFTSHIFT(Token, lextoken='<<'):
    pass

class T_SIGNRIGHTSHIFT(Token, lextoken='>>'):
    pass

class T_ZERORIGHTSHIFT(Token, lextoken='>>>'):
    pass

class T_EQUAL(Token, lextoken='=='):
    pass

class T_NOTEQUAL(Token, lextoken='!='):
    pass

class T_STRICTEQUAL(Token, lextoken='==='):
    pass
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
# Terminals

class T_SEMICOLON(Token):
    pass

class T_COLON(Token):
    pass

class T_COMMA(Token):
    pass

class T_DOT(Token):
    pass

class T_LPAREN(Token):
    pass

class T_RPAREN(Token):
    pass

class T_LSBRACKET(Token):
    pass

class T_RSBRACKET(Token):
    pass

class T_LCBRACKET(Token):
    pass

class T_RCBRACKET(Token):
    pass
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
class T_PLUSASSIGN(Token, lextoken='+='):
    pass

class T_MINUSASSIGN(Token, lextoken='-='):
    pass

class T_LSHIFTASSIGN(Token, lextoken='<<='):
    pass

class T_SRSHIFTASSIGN(Token, lextoken='>>='):
    pass

class T_ZRSHIFTASSIGN(Token, lextoken='>>>='):
    pass

class T_ANDASSIGN(Token, lextoken='&='):
    pass

class T_ORASSIGN(Token, lextoken='|='):
    pass

class T_XORASSIGN(Token, lextoken='^='):
    pass

def _gen_keyword_tokens():
    # Define keyword tokens

    for val, (token, typ) in keywords.js_keywords.items():
        clsname = 'T_%s' % token
        cls = TokenMeta(clsname, (Token,), {'__module__': __name__}, token=token)
        setattr(sys.modules[__name__], clsname, cls)
_gen_keyword_tokens()
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
class T_LPAREN(Token):
    pass

class T_RPAREN(Token):
    pass

class T_LSBRACKET(Token):
    pass

class T_RSBRACKET(Token):
    pass

class T_LCBRACKET(Token):
    pass

class T_RCBRACKET(Token):
    pass

class T_ID(Token):
    pass

class T_STRING(Token):
    pass

class T_NUMBER(Token):
    pass

class T_REGEXP(Token):
    pass

class T_PLUS(Token, lextoken='+'):
    pass
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
def _gen_keyword_tokens():
    # Define keyword tokens

    for val, (token, typ) in keywords.js_keywords.items():
        clsname = 'T_%s' % token
        cls = TokenMeta(clsname, (Token,), {'__module__': __name__}, token=token)
        setattr(sys.modules[__name__], clsname, cls)
_gen_keyword_tokens()
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
class T_MULTASSIGN(Token, lextoken='*='):
    pass

class T_DIVASSIGN(Token, lextoken='/='):
    pass

class T_REMAINASSIGN(Token, lextoken='%='):
    pass

class T_PLUSASSIGN(Token, lextoken='+='):
    pass

class T_MINUSASSIGN(Token, lextoken='-='):
    pass

class T_LSHIFTASSIGN(Token, lextoken='<<='):
    pass

class T_SRSHIFTASSIGN(Token, lextoken='>>='):
    pass

class T_ZRSHIFTASSIGN(Token, lextoken='>>>='):
    pass

class T_ANDASSIGN(Token, lextoken='&='):
    pass

class T_ORASSIGN(Token, lextoken='|='):
    pass

class T_XORASSIGN(Token, lextoken='^='):
    pass
github edgedb / edgedb / edgedb / lang / common / lang / javascript / parser / js.py View on Github external
class T_QUESTION(Token, lextoken='?'):
    pass

class T_PLUSPLUS(Token, lextoken='++'):
    pass

class T_MINUSMINUS(Token, lextoken='--'):
    pass

class T_LEFTSHIFT(Token, lextoken='<<'):
    pass

class T_SIGNRIGHTSHIFT(Token, lextoken='>>'):
    pass

class T_ZERORIGHTSHIFT(Token, lextoken='>>>'):
    pass

class T_EQUAL(Token, lextoken='=='):
    pass

class T_NOTEQUAL(Token, lextoken='!='):
    pass

class T_STRICTEQUAL(Token, lextoken='==='):
    pass

class T_STRICTNOTEQUAL(Token, lextoken='!=='):
    pass

class T_MULTASSIGN(Token, lextoken='*='):
    pass