gpt4 book ai didi

org.fife.ui.rsyntaxtextarea.modes.YamlTokenMaker.yylex()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 09:01:31 25 4
gpt4 key购买 nike

本文整理了Java中org.fife.ui.rsyntaxtextarea.modes.YamlTokenMaker.yylex()方法的一些代码示例,展示了YamlTokenMaker.yylex()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlTokenMaker.yylex()方法的具体详情如下:
包路径:org.fife.ui.rsyntaxtextarea.modes.YamlTokenMaker
类名称:YamlTokenMaker
方法名:yylex

YamlTokenMaker.yylex介绍

[英]Resumes scanning until the next regular expression is matched, the end of input is encountered or an I/O-Error occurs.
[中]继续扫描,直到下一个正则表达式匹配、遇到输入结束或发生I/O错误。

代码示例

代码示例来源:origin: bobbylight/RSyntaxTextArea

/**
 * Returns the first token in the linked list of tokens generated
 * from <code>text</code>.  This method must be implemented by
 * subclasses so they can correctly implement syntax highlighting.
 *
 * @param text The text from which to get tokens.
 * @param initialTokenType The token type we should start with.
 * @param startOffset The offset into the document at which
 *        <code>text</code> starts.
 * @return The first <code>Token</code> in a linked list representing
 *         the syntax highlighted text.
 */
@Override
public Token getTokenList(Segment text, int initialTokenType, int startOffset) {
  resetTokenList();
  this.offsetShift = -text.offset + startOffset;
  // Start off in the proper state.
  int state = YYINITIAL;
  s = text;
  try {
    yyreset(zzReader);
    yybegin(state);
    return yylex();
  } catch (IOException ioe) {
    ioe.printStackTrace();
    return new TokenImpl();
  }
}

代码示例来源:origin: com.fifesoft/rsyntaxtextarea

/**
 * Returns the first token in the linked list of tokens generated
 * from <code>text</code>.  This method must be implemented by
 * subclasses so they can correctly implement syntax highlighting.
 *
 * @param text The text from which to get tokens.
 * @param initialTokenType The token type we should start with.
 * @param startOffset The offset into the document at which
 *        <code>text</code> starts.
 * @return The first <code>Token</code> in a linked list representing
 *         the syntax highlighted text.
 */
@Override
public Token getTokenList(Segment text, int initialTokenType, int startOffset) {
  resetTokenList();
  this.offsetShift = -text.offset + startOffset;
  // Start off in the proper state.
  int state = YYINITIAL;
  s = text;
  try {
    yyreset(zzReader);
    yybegin(state);
    return yylex();
  } catch (IOException ioe) {
    ioe.printStackTrace();
    return new TokenImpl();
  }
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com