o

sjsonnet

Parser

object Parser

Parses Jsonnet source code Strings into a Expr syntax tree, using the FastParse parsing library. Uses precedence climbing to handle infix operators, and resolves local variable names to array indices during parsing to allow better performance at runtime.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Parser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def args[_](implicit arg0: P[Any]): P[Args]
  5. def arr[_](implicit arg0: P[Any]): P[Expr]
  6. def arrBody[_](implicit arg0: P[Any]): P[Expr]
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def assertExpr[_](index: Int)(implicit arg0: P[Any]): P[Expr]
  9. def assertStmt[_](implicit arg0: P[Any]): P[AssertStmt]
  10. def binaryop[_](implicit arg0: P[Any]): P[String]
  11. def bind[_](implicit arg0: P[Any]): P[Bind]
  12. def break[_](implicit arg0: P[Any]): P[Unit]
  13. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  14. def compSuffix[_](implicit arg0: P[Any]): P[Left[(ForSpec, Seq[CompSpec]), Nothing]]
  15. def compspec[_](implicit arg0: P[Any]): P[Seq[CompSpec]]
  16. def constructString(index: Int, lines: Seq[String]): Str
  17. def document[_](implicit arg0: P[Any]): P[(Expr, Map[String, Int])]
  18. def doubleString[_](implicit arg0: P[Any]): P[Seq[String]]
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  21. def error[_](index: Int)(implicit arg0: P[Any]): P[Expr.Error]
  22. def escape[_](implicit arg0: P[Any]): P[String]
  23. def escape0[_](implicit arg0: P[Any]): P[String]
  24. def escape1[_](implicit arg0: P[Any]): P[String]
  25. def expr[_](implicit arg0: P[Any]): P[Expr]
  26. def expr1[_](implicit arg0: P[Any]): P[Expr]
  27. def expr2[_](implicit arg0: P[Any]): P[Expr]
  28. def exprSuffix2[_](implicit arg0: P[Any]): P[(Expr) ⇒ Expr]
  29. def field[_](implicit arg0: P[Any]): P[Field]
  30. def fieldKeySep[_](implicit arg0: P[Any]): P[Visibility]
  31. def fieldname[_](implicit arg0: P[Any]): P[Product with Serializable with FieldName]
  32. def forspec[_](implicit arg0: P[Any]): P[ForSpec]
  33. def function[_](index: Int)(implicit arg0: P[Any]): P[Expr]
  34. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  36. def id[_](implicit arg0: P[Any]): P[String]
  37. def idStartChar(c: Char): Boolean
  38. def ifElse[_](index: Int)(implicit arg0: P[Any]): P[Expr]
  39. def ifspec[_](implicit arg0: P[Any]): P[IfSpec]
  40. def import[_](index: Int)(implicit arg0: P[Any]): P[Import]
  41. def importStr[_](index: Int)(implicit arg0: P[Any]): P[ImportStr]
  42. def indexFor[_](name: String)(implicit arg0: P[Any]): Int

    We assign local identifier names to integer offsets into a local variable array at parse time, to avoid having to make a separate pass over the AST to replace them.

    We assign local identifier names to integer offsets into a local variable array at parse time, to avoid having to make a separate pass over the AST to replace them. This is sub-optimal, since we do not keep track of the fact that identifiers in unrelated scopes could share slots in the array, but it's good enough for now since the number of local variables in a particular file tends to be pretty small.

    We do not bother releasing a slot when backtracking after a parse fails, because this parser uses cuts to aggressively prevent backtracking.

    The Jsonnet standard library std always lives at slot 0.

  43. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  44. val keywords: Set[String]
  45. def literalDoubleString[_](implicit arg0: P[Any]): P[Seq[String]]
  46. def literalSingleString[_](implicit arg0: P[Any]): P[Seq[String]]
  47. def local[_](implicit arg0: P[Any]): P[Expr]
  48. def localExpr[_](implicit arg0: P[Any]): P[Expr]
  49. def member[_](implicit arg0: P[Any]): P[Member]
  50. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  52. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  53. def number[_](implicit arg0: P[Any]): P[Num]
  54. def obj[_](implicit arg0: P[Any]): P[Expr]
  55. def objinside[_](implicit arg0: P[Any]): P[ObjBody]
  56. def objlocal[_](implicit arg0: P[Any]): P[BindStmt]
  57. def params[_](implicit arg0: P[Any]): P[Params]
  58. def parened[_](implicit arg0: P[Any]): P[Parened]
  59. val precedence: Map[String, Int]
  60. val precedenceTable: Seq[Seq[String]]
  61. def singleString[_](implicit arg0: P[Any]): P[Seq[String]]
  62. def string[_](implicit arg0: P[Any]): P[String]
  63. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  64. def toString(): String
    Definition Classes
    AnyRef → Any
  65. def tripleBarBlank[_](implicit arg0: P[Any]): P[String]
  66. def tripleBarBlankHead[_](implicit arg0: P[Any]): P[String]
  67. def tripleBarString[_](implicit arg0: P[Any]): P[Seq[String]]
  68. def tripleBarStringBody[_](w: String)(implicit arg0: P[Any]): P[Seq[String]]
  69. def tripleBarStringHead[_](implicit arg0: P[Any]): P[(Seq[String], String, String)]
  70. def tripleBarStringLines[_](implicit arg0: P[Any]): P[Seq[String]]
  71. def unaryOpExpr[_](index: Int, op: Char)(implicit arg0: P[Any]): P[UnaryOp]
  72. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  73. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  74. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped