Java 类org.yaml.snakeyaml.tokens.DirectiveToken 实例源码
项目:AndroidApktool
文件:ScannerImpl.java
@SuppressWarnings({ "unchecked", "rawtypes" })
private Token scanDirective() {
// See the specification for details.
Mark startMark = reader.getMark();
Mark endMark;
reader.forward();
String name = scanDirectiveName(startMark);
List<?> value = null;
if ("YAML".equals(name)) {
value = scanYamlDirectiveValue(startMark);
endMark = reader.getMark();
} else if ("TAG".equals(name)) {
value = scanTagDirectiveValue(startMark);
endMark = reader.getMark();
} else {
endMark = reader.getMark();
int ff = 0;
while (Constant.NULL_OR_LINEBR.hasNo(reader.peek(ff))) {
ff++;
}
if (ff > 0) {
reader.forward(ff);
}
}
scanDirectiveIgnoredLine(startMark);
return new DirectiveToken(name, value, startMark, endMark);
}
项目:5zig-TIMV-Plugin
文件:ScannerImpl.java
@SuppressWarnings({ "unchecked", "rawtypes" })
private Token scanDirective() {
// See the specification for details.
Mark startMark = reader.getMark();
Mark endMark;
reader.forward();
String name = scanDirectiveName(startMark);
List<?> value = null;
if ("YAML".equals(name)) {
value = scanYamlDirectiveValue(startMark);
endMark = reader.getMark();
} else if ("TAG".equals(name)) {
value = scanTagDirectiveValue(startMark);
endMark = reader.getMark();
} else {
endMark = reader.getMark();
int ff = 0;
while (Constant.NULL_OR_LINEBR.hasNo(reader.peek(ff))) {
ff++;
}
if (ff > 0) {
reader.forward(ff);
}
}
scanDirectiveIgnoredLine(startMark);
return new DirectiveToken(name, value, startMark, endMark);
}
项目:snake-yaml
文件:ScannerImpl.java
@SuppressWarnings({ "unchecked", "rawtypes" })
private Token scanDirective() {
// See the specification for details.
Mark startMark = reader.getMark();
Mark endMark;
reader.forward();
String name = scanDirectiveName(startMark);
List<?> value = null;
if ("YAML".equals(name)) {
value = scanYamlDirectiveValue(startMark);
endMark = reader.getMark();
} else if ("TAG".equals(name)) {
value = scanTagDirectiveValue(startMark);
endMark = reader.getMark();
} else {
endMark = reader.getMark();
int ff = 0;
while (Constant.NULL_OR_LINEBR.hasNo(reader.peek(ff))) {
ff++;
}
if (ff > 0) {
reader.forward(ff);
}
}
scanDirectiveIgnoredLine(startMark);
return new DirectiveToken(name, value, startMark, endMark);
}
项目:snake-yaml
文件:CanonicalScanner.java
private Token scanDirective() {
String chunk1 = data.substring(index, index + DIRECTIVE.length());
char chunk2 = data.charAt(index + DIRECTIVE.length());
if (DIRECTIVE.equals(chunk1) && "\n\0".indexOf(chunk2) != -1) {
index += DIRECTIVE.length();
List<Integer> implicit = new ArrayList<Integer>(2);
implicit.add(new Integer(1));
implicit.add(new Integer(1));
return new DirectiveToken<Integer>("YAML", implicit, mark, mark);
} else {
throw new CanonicalException("invalid directive");
}
}
项目:SubServers-2
文件:ScannerImpl.java
@SuppressWarnings({ "unchecked", "rawtypes" })
private Token scanDirective() {
// See the specification for details.
Mark startMark = reader.getMark();
Mark endMark;
reader.forward();
String name = scanDirectiveName(startMark);
List<?> value = null;
if ("YAML".equals(name)) {
value = scanYamlDirectiveValue(startMark);
endMark = reader.getMark();
} else if ("TAG".equals(name)) {
value = scanTagDirectiveValue(startMark);
endMark = reader.getMark();
} else {
endMark = reader.getMark();
int ff = 0;
while (Constant.NULL_OR_LINEBR.hasNo(reader.peek(ff))) {
ff++;
}
if (ff > 0) {
reader.forward(ff);
}
}
scanDirectiveIgnoredLine(startMark);
return new DirectiveToken(name, value, startMark, endMark);
}
项目:snakeyaml
文件:ScannerImpl.java
@SuppressWarnings({ "unchecked", "rawtypes" })
private Token scanDirective() {
// See the specification for details.
Mark startMark = reader.getMark();
Mark endMark;
reader.forward();
String name = scanDirectiveName(startMark);
List<?> value = null;
if ("YAML".equals(name)) {
value = scanYamlDirectiveValue(startMark);
endMark = reader.getMark();
} else if ("TAG".equals(name)) {
value = scanTagDirectiveValue(startMark);
endMark = reader.getMark();
} else {
endMark = reader.getMark();
int ff = 0;
while (Constant.NULL_OR_LINEBR.hasNo(reader.peek(ff))) {
ff++;
}
if (ff > 0) {
reader.forward(ff);
}
}
scanDirectiveIgnoredLine(startMark);
return new DirectiveToken(name, value, startMark, endMark);
}
项目:snakeyaml
文件:CanonicalScanner.java
private Token scanDirective() {
String chunk1 = data.substring(index, index + DIRECTIVE.length());
char chunk2 = data.charAt(index + DIRECTIVE.length());
if (DIRECTIVE.equals(chunk1) && "\n\0".indexOf(chunk2) != -1) {
index += DIRECTIVE.length();
List<Integer> implicit = new ArrayList<Integer>(2);
implicit.add(new Integer(1));
implicit.add(new Integer(1));
return new DirectiveToken<Integer>("YAML", implicit, mark, mark);
} else {
throw new CanonicalException("invalid directive");
}
}
项目:TestTheTeacher
文件:ScannerImpl.java
@SuppressWarnings({ "unchecked", "rawtypes" })
private Token scanDirective() {
// See the specification for details.
Mark startMark = reader.getMark();
Mark endMark;
reader.forward();
String name = scanDirectiveName(startMark);
List<?> value = null;
if ("YAML".equals(name)) {
value = scanYamlDirectiveValue(startMark);
endMark = reader.getMark();
} else if ("TAG".equals(name)) {
value = scanTagDirectiveValue(startMark);
endMark = reader.getMark();
} else {
endMark = reader.getMark();
int ff = 0;
while (Constant.NULL_OR_LINEBR.hasNo(reader.peek(ff))) {
ff++;
}
if (ff > 0) {
reader.forward(ff);
}
}
scanDirectiveIgnoredLine(startMark);
return new DirectiveToken(name, value, startMark, endMark);
}
项目:org.openntf.domino
文件:ScannerImpl.java
@SuppressWarnings({ "unchecked", "rawtypes" })
private Token scanDirective() {
// See the specification for details.
Mark startMark = reader.getMark();
Mark endMark;
reader.forward();
String name = scanDirectiveName(startMark);
List<?> value = null;
if ("YAML".equals(name)) {
value = scanYamlDirectiveValue(startMark);
endMark = reader.getMark();
} else if ("TAG".equals(name)) {
value = scanTagDirectiveValue(startMark);
endMark = reader.getMark();
} else {
endMark = reader.getMark();
int ff = 0;
while (Constant.NULL_OR_LINEBR.hasNo(reader.peek(ff))) {
ff++;
}
if (ff > 0) {
reader.forward(ff);
}
}
scanDirectiveIgnoredLine(startMark);
return new DirectiveToken(name, value, startMark, endMark);
}