Class InnerLiteral

java.lang.Object
com.oracle.truffle.regex.tregex.parser.ast.InnerLiteral

public class InnerLiteral extends Object
Represents a literal string inside the regular expression that can be searched for before starting the actual regular expression matcher.
  • Constructor Details

  • Method Details

    • getLiteral

      public AbstractString getLiteral()
      The literal string.
    • getLiteralContent

      public com.oracle.truffle.api.strings.TruffleString getLiteralContent()
    • getMask

      public AbstractString getMask()
      An optional mask for matching the string in ignore-case mode.
    • getMaskContent

      public com.oracle.truffle.api.strings.TruffleString.WithMask getMaskContent()
    • hasMask

      public boolean hasMask()
    • getMaxPrefixSize

      public int getMaxPrefixSize()
      The maximum number of code points the regular expression may match before matching this literal. Example: the inner literal of /a?b/ is "b", with a max prefix size of 1. If there are loops in the prefix, returns -1.