c

sjsonnet

Evaluator

class Evaluator extends EvalScope

Recursively walks the Expr trees to convert them into into Val objects that can be materialized to JSON.

Performs import resolution and parsing on-demand when the relevant nodes in the syntax tree are reached, and caches the evaluated result of each imported module to be re-used. Parsing is cached separatedly by an external parseCache.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Evaluator
  2. EvalScope
  3. EvalErrorScope
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Evaluator(parseCache: Map[String, Parsed[(Expr, Map[String, Int])]], extVars: Map[String, Value], wd: Path, importer: (Path, String) ⇒ Option[(Path, String)])

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val cachedImportedStrings: Map[Path, String]
  6. val cachedImports: Map[Path, Val]
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  8. val emptyMaterializeFileScope: FileScope
    Definition Classes
    EvalScope
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. implicit def evalScope: EvalScope
  12. val extVars: Map[String, Value]
    Definition Classes
    EvaluatorEvalErrorScope
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def loadCachedSource(p: Path): Option[String]
    Definition Classes
    EvaluatorEvalErrorScope
  17. val loadedFileContents: Map[Path, String]
  18. def materialize(v: Val): Value
    Definition Classes
    EvaluatorEvalScope
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def resolveImport(value: String, offset: Int)(implicit scope: ValScope, fileScope: FileScope): (Path, String)
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. def visitAssert(offset: Int, value: Expr, msg: Option[Expr], returned: Expr)(implicit scope: ValScope, fileScope: FileScope): Val
  26. def visitBinaryOp(offset: Int, lhs: Expr, op: Op, rhs: Expr)(implicit scope: ValScope, fileScope: FileScope): Val
  27. def visitBindings(bindings: Iterator[Bind], scope: (Option[Obj], Option[Obj]) ⇒ ValScope)(implicit fileScope: FileScope): Iterator[(Int, (Option[Obj], Option[Obj]) ⇒ Lazy)]
  28. def visitComp(f: List[CompSpec], scopes: Seq[ValScope])(implicit fileScope: FileScope): Seq[ValScope]
  29. def visitError(offset: Int, value: Expr)(implicit scope: ValScope, fileScope: FileScope): Nothing
  30. def visitExpr(expr: Expr)(implicit scope: ValScope, fileScope: FileScope): Val
    Definition Classes
    EvaluatorEvalScope
  31. def visitFieldName(fieldName: FieldName, offset: Int)(implicit scope: ValScope, fileScope: FileScope): Option[String]
  32. def visitId(offset: Int, value: Int)(implicit scope: ValScope, fileScope: FileScope): Val
  33. def visitIfElse(offset: Int, cond: Expr, then: Expr, else0: Option[Expr])(implicit scope: ValScope, fileScope: FileScope): Val
  34. def visitImport(offset: Int, value: String)(implicit scope: ValScope, fileScope: FileScope): Val
  35. def visitImportStr(offset: Int, value: String)(implicit scope: ValScope, fileScope: FileScope): Str
  36. def visitLookup(offset: Int, value: Expr, index: Expr)(implicit scope: ValScope, fileScope: FileScope): Val
  37. def visitMethod(rhs: Expr, params: Params, outerOffset: Int)(implicit scope: ValScope, fileScope: FileScope): Func
  38. def visitObjBody(b: ObjBody)(implicit scope: ValScope, fileScope: FileScope): Obj
  39. def visitSelect(offset: Int, value: Expr, name: String)(implicit scope: ValScope, fileScope: FileScope): Val
  40. def visitUnaryOp(op: Op, value: Expr)(implicit scope: ValScope, fileScope: FileScope): Val
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. val wd: Path
    Definition Classes
    EvaluatorEvalErrorScope

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 EvalScope

Inherited from EvalErrorScope

Inherited from AnyRef

Inherited from Any

Ungrouped