/** * Returns the File currently being lexed. * * If this Source is not a {@link FileLexerSource}, then * it will ask the parent Source, and so forth recursively. * If no Source on the stack is a FileLexerSource, returns null. */ public String getPath() { Source parent = getParent(); if (parent != null) return parent.getPath(); return null; }
/** * Returns the File currently being lexed. * * If this Source is not a {@link FileLexerSource}, then * it will ask the parent Source, and so forth recursively. * If no Source on the stack is a FileLexerSource, returns null. */ public String getPath() { Source parent = getParent(); if (parent != null) return parent.getPath(); return null; }
/** * Returns the File currently being lexed. * * If this Source is not a {@link FileLexerSource}, then * it will ask the parent Source, and so forth recursively. * If no Source on the stack is a FileLexerSource, returns null. */ @CheckForNull public String getPath() { Source parent = getParent(); if (parent != null) return parent.getPath(); return null; }
protected void pragma_once(@Nonnull Token name) throws IOException, LexerException { Source s = this.source; if (!onceseenpaths.add(s.getPath())) { Token mark = pop_source(true); // FixedTokenSource should never generate a linemarker on exit. if (mark != null) push_source(new FixedTokenSource(Arrays.asList(mark)), true); } }
void used(String name) { if (macrosDependenciesOut != null) { Source src = getSource(); macrosDependenciesOut.macroUsed(src == null ? null : src.getPath(), name); } } };
void used(String name) { if (macrosDependenciesOut != null) { Source src = getSource(); macrosDependenciesOut.macroUsed(src == null ? null : src.getPath(), name); } } };
@Override public void handleWarning( final Source source, final int line, final int column, final String msg) throws LexerException { try { this.on_warning.onWarning(source.getPath(), line, column, msg); } catch (final SoShaderException e) { throw new LexerException(e); } }
@Override public void handleError( final Source source, final int line, final int column, final String msg) throws LexerException { try { this.on_error.onError(source.getPath(), line, column, msg); } catch (final SoShaderException e) { throw new LexerException(e); } }
define.setElementFile(macro.getSource().getPath());
define.setElementFile(macro.getSource().getPath());
include(source.getPath(), tok.getLine(), name, quoted, next);
include(source == null ? null : source.getPath(), tok == null ? -1 : tok.getLine(), name, quoted);
include(source == null ? null : source.getPath(), tok == null ? -1 : tok.getLine(), name, quoted);