Changeset 179159 in webkit for trunk/Source/JavaScriptCore/parser/Parser.cpp
- Timestamp:
- Jan 26, 2015, 5:14:14 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Parser.cpp
r178888 r179159 2028 2028 failIfStackOverflow(); 2029 2029 switch (m_token.m_type) { 2030 case FUNCTION: { 2031 JSTokenLocation location(tokenLocation()); 2032 unsigned functionKeywordStart = tokenStart(); 2033 next(); 2034 ParserFunctionInfo<TreeBuilder> info; 2035 info.name = &m_vm->propertyNames->nullIdentifier; 2036 failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, FunctionMode, false, info)), "Cannot parse function expression"); 2037 return context.createFunctionExpr(location, info, functionKeywordStart); 2038 } 2030 2039 case OPENBRACE: 2031 2040 if (strictMode()) … … 2164 2173 } 2165 2174 2166 if (match(FUNCTION)) { 2167 unsigned functionKeywordStart = tokenStart(); 2168 location = tokenLocation(); 2169 next(); 2170 ParserFunctionInfo<TreeBuilder> info; 2171 info.name = &m_vm->propertyNames->nullIdentifier; 2172 failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, FunctionMode, false, info)), "Cannot parse function expression"); 2173 base = context.createFunctionExpr(location, info, functionKeywordStart); 2174 } else 2175 base = parsePrimaryExpression(context); 2175 base = parsePrimaryExpression(context); 2176 2176 2177 2177 failIfFalse(base, "Cannot parse base expression");
Note:
See TracChangeset
for help on using the changeset viewer.