SourceCode subExpression(unsigned openBrace, unsigned closeBrace, int firstLine, int startColumn);
+#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
+ SourceCode subArrowExpression(unsigned startArrowFunction, unsigned endArrowFunction, int firstLine, int startColumn);
+#endif
private:
RefPtr<SourceProvider> m_provider;
int m_startChar;
{
return SourceCode(StringSourceProvider::create(source, url, startPosition), startPosition.m_line.oneBasedInt(), startPosition.m_column.oneBasedInt());
}
+
+#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
+ inline SourceCode SourceCode::subArrowExpression(unsigned startArrowFunction, unsigned endArrowFunction, int firstLine, int startColumn)
+ {
+ ASSERT(provider()->source()[startArrowFunction] == '=' && provider()->source()[startArrowFunction + 1] == '>');
+
+ startColumn += 1; // Convert to base 1.
+ return SourceCode(provider(), startArrowFunction, endArrowFunction, firstLine, startColumn);
+ }
+#endif
inline SourceCode SourceCode::subExpression(unsigned openBrace, unsigned closeBrace, int firstLine, int startColumn)
{