Home | History | Annotate | Download | only in functional

Lines Matching refs:INDENT

44  ... 1 COLON NEWLINE INDENT PRINT a NEWLINE DEDENT b ASSIGN 3 ...
49 Upon NEWLINE token from the lexer, however, an INDENT or DEDENT token
53 then check against stack for indent vs dedent. If LEADING_WS, then
54 the column of the next non-whitespace token will dictate indent vs
61 in indent level from one token to the next.
72 /** The stack of indent levels (column numbers) */
101 pushed on the stack, and one INDENT token is generated. If it
133 // if not a NEWLINE, doesn't signal indent/dedent work; just enqueue
163 var cpos = t.getCharPositionInLine(); // column dictates indent/dedent
171 // compare to last indent level
173 if ( cpos > lastIndent ) { // they indented; track and gen INDENT
175 var indent = new ANTLR.runtime.CommonToken(PythonParser.INDENT, "");
176 indent.setCharPositionInLine(t.getCharPositionInLine());
177 indent.setLine(t.getLine());
178 this.tokens.push(indent);
183 // generate DEDENTs for each indent level we backed up over
190 this.sp = prevIndex; // pop those off indent level
220 /** Return the index on stack of previous indent level == i else -1 */
246 a a \n INDENT b b \n c \n DEDENT d \n EOF
251 a c \n INDENT b \n DEDENT c \n EOF
257 a \n INDENT b \n INDENT c \n DEDENT DEDENT d \n EOF
269 a \n INDENT c \n INDENT d \n DEDENT e \n f \n INDENT g \n h \n i \n INDENT j \n DEDENT DEDENT k \n DEDENT EOF
276 a \n INDENT b \n c \n INDENT d \n e \n DEDENT DEDENT EOF