public void Visit(DebuggerNode node) { if (node != null) { node.Index = NextOrderIndex; } }
public void Visit(DebuggerNode node) { // invalid! ignore IsValid = false; }
public void Visit(DebuggerNode node) { Debug.Fail("shouldn't get here"); }
public void Visit(DebuggerNode node) { // not applicable; terminate }
//--------------------------------------------------------------------------------------- // ParseDebuggerStatement // // DebuggerStatement : // 'debugger' // // This function may return a null AST under error condition. The caller should handle // that case. // Regardless of error conditions, on exit the parser points to the first token after // the debugger statement //--------------------------------------------------------------------------------------- private AstNode ParseDebuggerStatement() { // clone the current context and skip it var node = new DebuggerNode(m_currentToken.Clone(), this); GetNextToken(); // this token can only be a stand-alone statement if (JSToken.Semicolon == m_currentToken.Token) { // add the semicolon to the cloned context and skip it node.TerminatingContext = m_currentToken.Clone(); GetNextToken(); } else if (m_foundEndOfLine || JSToken.RightCurly == m_currentToken.Token || JSToken.EndOfFile == m_currentToken.Token) { // semicolon insertion rules applied // a right-curly or an end of line is something we don't WANT to throw a warning for. // Just too common and doesn't really warrant a warning (in my opinion) if (JSToken.RightCurly != m_currentToken.Token && JSToken.EndOfFile != m_currentToken.Token) { ReportError(JSError.SemicolonInsertion, node.Context.IfNotNull(c => c.FlattenToEnd()), true); } } else { // if it is anything else, it's an error ReportError(JSError.NoSemicolon, true); } // return the new AST object return node; }