Java Code Examples for org.antlr.runtime.tree.CommonTree#getTokenStopIndex()
The following examples show how to use
org.antlr.runtime.tree.CommonTree#getTokenStopIndex() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 2
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 3
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 4
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p< 0 || q< 0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 5
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 6
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 7
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 8
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p< 0 || q< 0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 9
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p< 0 || q< 0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 10
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 11
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 12
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 13
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 14
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 15
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 16
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
Example 17
Source File: CompilationState.java From codebuff with BSD 2-Clause "Simplified" License | 5 votes |
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST !=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }