Go to the source code of this file.
|
enum | literal_type_t {
LT_DOUBLE,
LT_STRING,
LT_BOOL,
LT_NULL,
LT_REGEXP
} |
|
enum | statement_type_t {
STAT_BLOCK,
STAT_BREAK,
STAT_CONTINUE,
STAT_EMPTY,
STAT_EXPR,
STAT_FOR,
STAT_FORIN,
STAT_IF,
STAT_LABEL,
STAT_RETURN,
STAT_SWITCH,
STAT_THROW,
STAT_TRY,
STAT_VAR,
STAT_WHILE,
STAT_WITH,
STAT_ASSIGN,
STAT_CALL,
STAT_CONST,
STAT_DIM,
STAT_DOUNTIL,
STAT_DOWHILE,
STAT_EXITDO,
STAT_EXITFOR,
STAT_EXITFUNC,
STAT_EXITPROP,
STAT_EXITSUB,
STAT_FOREACH,
STAT_FORTO,
STAT_FUNC,
STAT_IF,
STAT_ONERROR,
STAT_SELECT,
STAT_SET,
STAT_STOP,
STAT_UNTIL,
STAT_WHILE,
STAT_WHILELOOP,
STAT_RETVAL
} |
|
enum | expression_type_t {
EXPR_COMMA,
EXPR_OR,
EXPR_AND,
EXPR_BOR,
EXPR_BXOR,
EXPR_BAND,
EXPR_INSTANCEOF,
EXPR_IN,
EXPR_ADD,
EXPR_SUB,
EXPR_MUL,
EXPR_DIV,
EXPR_MOD,
EXPR_DELETE,
EXPR_VOID,
EXPR_TYPEOF,
EXPR_MINUS,
EXPR_PLUS,
EXPR_POSTINC,
EXPR_POSTDEC,
EXPR_PREINC,
EXPR_PREDEC,
EXPR_EQ,
EXPR_EQEQ,
EXPR_NOTEQ,
EXPR_NOTEQEQ,
EXPR_LESS,
EXPR_LESSEQ,
EXPR_GREATER,
EXPR_GREATEREQ,
EXPR_BITNEG,
EXPR_LOGNEG,
EXPR_LSHIFT,
EXPR_RSHIFT,
EXPR_RRSHIFT,
EXPR_ASSIGN,
EXPR_ASSIGNLSHIFT,
EXPR_ASSIGNRSHIFT,
EXPR_ASSIGNRRSHIFT,
EXPR_ASSIGNADD,
EXPR_ASSIGNSUB,
EXPR_ASSIGNMUL,
EXPR_ASSIGNDIV,
EXPR_ASSIGNMOD,
EXPR_ASSIGNAND,
EXPR_ASSIGNOR,
EXPR_ASSIGNXOR,
EXPR_COND,
EXPR_ARRAY,
EXPR_MEMBER,
EXPR_NEW,
EXPR_CALL,
EXPR_THIS,
EXPR_FUNC,
EXPR_IDENT,
EXPR_ARRAYLIT,
EXPR_PROPVAL,
EXPR_LITERAL,
EXPR_ADD,
EXPR_AND,
EXPR_BOOL,
EXPR_BRACKETS,
EXPR_CONCAT,
EXPR_DIV,
EXPR_DOUBLE,
EXPR_EMPTY,
EXPR_EQUAL,
EXPR_EQV,
EXPR_EXP,
EXPR_GT,
EXPR_GTEQ,
EXPR_IDIV,
EXPR_IMP,
EXPR_INT,
EXPR_IS,
EXPR_LT,
EXPR_LTEQ,
EXPR_ME,
EXPR_MEMBER,
EXPR_MOD,
EXPR_MUL,
EXPR_NEG,
EXPR_NEQUAL,
EXPR_NEW,
EXPR_NOARG,
EXPR_NOT,
EXPR_NOTHING,
EXPR_NULL,
EXPR_OR,
EXPR_STRING,
EXPR_SUB,
EXPR_XOR
} |
|
|
HRESULT | script_parse (script_ctx_t *, struct _compiler_ctx_t *, const WCHAR *, const WCHAR *, BOOL, parser_ctx_t **) DECLSPEC_HIDDEN |
|
void | parser_release (parser_ctx_t *) DECLSPEC_HIDDEN |
|
int | parser_lex (void *, parser_ctx_t *) DECLSPEC_HIDDEN |
|
static void * | parser_alloc (parser_ctx_t *ctx, DWORD size) |
|
static void * | parser_alloc_tmp (parser_ctx_t *ctx, DWORD size) |
|
BOOL | is_identifier_char (WCHAR) DECLSPEC_HIDDEN |
|
BOOL | unescape (WCHAR *, size_t *) DECLSPEC_HIDDEN |
|
HRESULT | parse_decimal (const WCHAR **, const WCHAR *, double *) DECLSPEC_HIDDEN |
|
literal_t * | parse_regexp (parser_ctx_t *) DECLSPEC_HIDDEN |
|
literal_t * | new_boolean_literal (parser_ctx_t *, BOOL) DECLSPEC_HIDDEN |
|
BOOL | try_parse_ccval (parser_ctx_t *, ccval_t *) DECLSPEC_HIDDEN |
|
BOOL | parse_cc_expr (parser_ctx_t *) DECLSPEC_HIDDEN |
|
static ccval_t | ccval_num (double n) |
|
static ccval_t | ccval_bool (BOOL b) |
|
static BOOL | get_ccbool (ccval_t v) |
|
static double | get_ccnum (ccval_t v) |
|
jsstr_t * | compiler_alloc_string_len (struct _compiler_ctx_t *, const WCHAR *, unsigned) DECLSPEC_HIDDEN |
|
◆ argument_t
◆ array_element_t
◆ case_clausule_t
◆ expression_t
◆ function_expression_t
◆ parameter_t
◆ parser_ctx_t
◆ property_definition_t
◆ source_elements_t
◆ statement_t
◆ variable_declaration_t
◆ expression_type_t
Enumerator |
---|
EXPR_COMMA | |
EXPR_OR | |
EXPR_AND | |
EXPR_BOR | |
EXPR_BXOR | |
EXPR_BAND | |
EXPR_INSTANCEOF | |
EXPR_IN | |
EXPR_ADD | |
EXPR_SUB | |
EXPR_MUL | |
EXPR_DIV | |
EXPR_MOD | |
EXPR_DELETE | |
EXPR_VOID | |
EXPR_TYPEOF | |
EXPR_MINUS | |
EXPR_PLUS | |
EXPR_POSTINC | |
EXPR_POSTDEC | |
EXPR_PREINC | |
EXPR_PREDEC | |
EXPR_EQ | |
EXPR_EQEQ | |
EXPR_NOTEQ | |
EXPR_NOTEQEQ | |
EXPR_LESS | |
EXPR_LESSEQ | |
EXPR_GREATER | |
EXPR_GREATEREQ | |
EXPR_BITNEG | |
EXPR_LOGNEG | |
EXPR_LSHIFT | |
EXPR_RSHIFT | |
EXPR_RRSHIFT | |
EXPR_ASSIGN | |
EXPR_ASSIGNLSHIFT | |
EXPR_ASSIGNRSHIFT | |
EXPR_ASSIGNRRSHIFT | |
EXPR_ASSIGNADD | |
EXPR_ASSIGNSUB | |
EXPR_ASSIGNMUL | |
EXPR_ASSIGNDIV | |
EXPR_ASSIGNMOD | |
EXPR_ASSIGNAND | |
EXPR_ASSIGNOR | |
EXPR_ASSIGNXOR | |
EXPR_COND | |
EXPR_ARRAY | |
EXPR_MEMBER | |
EXPR_NEW | |
EXPR_CALL | |
EXPR_THIS | |
EXPR_FUNC | |
EXPR_IDENT | |
EXPR_ARRAYLIT | |
EXPR_PROPVAL | |
EXPR_LITERAL | |
EXPR_ADD | |
EXPR_AND | |
EXPR_BOOL | |
EXPR_BRACKETS | |
EXPR_CONCAT | |
EXPR_DIV | |
EXPR_DOUBLE | |
EXPR_EMPTY | |
EXPR_EQUAL | |
EXPR_EQV | |
EXPR_EXP | |
EXPR_GT | |
EXPR_GTEQ | |
EXPR_IDIV | |
EXPR_IMP | |
EXPR_INT | |
EXPR_IS | |
EXPR_LT | |
EXPR_LTEQ | |
EXPR_ME | |
EXPR_MEMBER | |
EXPR_MOD | |
EXPR_MUL | |
EXPR_NEG | |
EXPR_NEQUAL | |
EXPR_NEW | |
EXPR_NOARG | |
EXPR_NOT | |
EXPR_NOTHING | |
EXPR_NULL | |
EXPR_OR | |
EXPR_STRING | |
EXPR_SUB | |
EXPR_XOR | |
Definition at line 216 of file parser.h.
◆ literal_type_t
Enumerator |
---|
LT_DOUBLE | |
LT_STRING | |
LT_BOOL | |
LT_NULL | |
LT_REGEXP | |
Definition at line 72 of file parser.h.
◆ statement_type_t
Enumerator |
---|
STAT_BLOCK | |
STAT_BREAK | |
STAT_CONTINUE | |
STAT_EMPTY | |
STAT_EXPR | |
STAT_FOR | |
STAT_FORIN | |
STAT_IF | |
STAT_LABEL | |
STAT_RETURN | |
STAT_SWITCH | |
STAT_THROW | |
STAT_TRY | |
STAT_VAR | |
STAT_WHILE | |
STAT_WITH | |
STAT_ASSIGN | |
STAT_CALL | |
STAT_CONST | |
STAT_DIM | |
STAT_DOUNTIL | |
STAT_DOWHILE | |
STAT_EXITDO | |
STAT_EXITFOR | |
STAT_EXITFUNC | |
STAT_EXITPROP | |
STAT_EXITSUB | |
STAT_FOREACH | |
STAT_FORTO | |
STAT_FUNC | |
STAT_IF | |
STAT_ONERROR | |
STAT_SELECT | |
STAT_SET | |
STAT_STOP | |
STAT_UNTIL | |
STAT_WHILE | |
STAT_WHILELOOP | |
STAT_RETVAL | |
Definition at line 104 of file parser.h.
◆ ccval_bool()
◆ ccval_num()
◆ compiler_alloc_string_len()
Definition at line 133 of file compile.c.
137 if(!
ctx->code->str_pool_size) {
139 if(!
ctx->code->str_pool)
141 ctx->code->str_pool_size = 8;
142 }
else if(
ctx->code->str_pool_size ==
ctx->code->str_cnt) {
149 ctx->code->str_pool = new_pool;
150 ctx->code->str_pool_size *= 2;
157 ctx->code->str_pool[
ctx->code->str_cnt++] = new_str;
jsstr_t * jsstr_alloc_len(const WCHAR *buf, unsigned len)
static void * heap_realloc(void *mem, size_t len)
static void * heap_alloc(size_t len)
Referenced by compiler_alloc_string(), parse_regexp(), and parse_string_literal().
◆ get_ccbool()
◆ get_ccnum()
Definition at line 400 of file parser.h.
402 return v.is_num ?
v.u.n :
v.u.b;
◆ is_identifier_char()
◆ new_boolean_literal()
Definition at line 387 of file lex.c.
void * parser_alloc(parser_ctx_t *, size_t) DECLSPEC_HIDDEN
Referenced by cc_token().
◆ parse_cc_expr()
◆ parse_decimal()
Definition at line 397 of file lex.c.
404 hlp =
d*10 + *(
ptr++) -
'0';
421 hlp =
d*10 + *(
ptr++) -
'0';
438 }
else if(*
ptr ==
'-') {
442 WARN(
"Expected exponent part\n");
448 WARN(
"unexpected end of file\n");
464 WARN(
"wrong char after zero\n");
static size_t double int int int * sign
BOOL is_identifier_char(WCHAR c)
float pow(float __x, int __y)
#define JS_E_MISSING_SEMICOLON
Referenced by next_token(), parse_json_value(), and parse_numeric_literal().
◆ parse_regexp()
Definition at line 1115 of file lex.c.
1117 const WCHAR *re, *flags_ptr;
1125 while(*--
ctx->ptr !=
'/');
1129 while(
ctx->ptr <
ctx->end) {
1130 if(*
ctx->ptr ==
'\\') {
1131 if(++
ctx->ptr ==
ctx->end)
1134 if(*
ctx->ptr ==
'\n')
1136 if(*
ctx->ptr ==
']')
1139 if(*
ctx->ptr ==
'/')
1142 if(*
ctx->ptr ==
'[')
1148 if(
ctx->ptr ==
ctx->end || *
ctx->ptr !=
'/') {
1149 WARN(
"pre-parsing failed\n");
1153 re_len =
ctx->ptr-re;
1155 flags_ptr = ++
ctx->ptr;
HRESULT parse_regexp_flags(const WCHAR *, DWORD, DWORD *) DECLSPEC_HIDDEN
jsstr_t * compiler_alloc_string_len(compiler_ctx_t *ctx, const WCHAR *str, unsigned len)
void * parser_alloc(parser_ctx_t *, size_t) DECLSPEC_HIDDEN
◆ parser_alloc()
Definition at line 58 of file parser.h.
void * heap_pool_alloc(heap_pool_t *, DWORD) __WINE_ALLOC_SIZE(2) DECLSPEC_HIDDEN
◆ parser_alloc_tmp()
Definition at line 63 of file parser.h.
void * heap_pool_alloc(heap_pool_t *, DWORD) __WINE_ALLOC_SIZE(2) DECLSPEC_HIDDEN
◆ parser_lex()
Definition at line 1102 of file lex.c.
static int cc_token(parser_ctx_t *ctx, void *lval)
static int next_token(parser_ctx_t *ctx, void *lval)
◆ parser_release()
◆ script_parse()
◆ try_parse_ccval()
Definition at line 907 of file lex.c.
922 if(*
ctx->ptr ==
'@') {
static cc_var_t * find_cc_var(cc_ctx_t *cc, const WCHAR *name, unsigned name_len)
GLdouble GLdouble GLdouble r
static BOOL parse_numeric_literal(parser_ctx_t *ctx, double *ret)
static ccval_t ccval_bool(BOOL b)
static ccval_t ccval_num(double n)
_In_ ULONG _In_ ULONG_PTR ident
static INT ident_len(LPCTSTR p)
static BOOL parse_cc_identifier(parser_ctx_t *ctx, const WCHAR **ret, unsigned *ret_len)
static BOOL skip_spaces(parser_ctx_t *ctx)
static int check_keyword(parser_ctx_t *ctx, const WCHAR *word, const WCHAR **lval)
◆ unescape()
Definition at line 227 of file lex.c.
303 c =
c*8 + (*
p++ -
'0');
305 c =
c*8 + (*
p++ -
'0');
static int hex_to_int(WCHAR c)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by parse_json_string(), parse_string_literal(), and PathCreateFromUrlW().