Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions sjsonnet/src/sjsonnet/ArrayOps.scala

This file was deleted.

1 change: 1 addition & 0 deletions sjsonnet/src/sjsonnet/StaticOptimizer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class StaticOptimizer(
scope.get(name) match {
case ScopedVal(v: Val with Expr, _, _) => v
case ScopedVal(_, _, idx) => ValidId(pos, name, idx)
case null if name == "$std" => std
case null if name == "std" => std
case _ => failOrWarn("Unknown variable: "+name, e)
}
Expand Down
3 changes: 3 additions & 0 deletions sjsonnet/src/sjsonnet/Std.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,9 @@ class Std(private val additionalNativeFunctions: Map[String, Val.Builtin] = Map.
builtin("trim", "str") { (_, _, str: String) =>
trailingWhiteSpacePattern.matcher(leadingWhiteSpacePattern.matcher(str).replaceAll("")).replaceAll("")
},
builtin("equals", "a", "b") { (_, ev, a: Val, b: Val) =>
ev.equal(a, b)
},
builtin("equalsIgnoreCase", "str1", "str2") { (_, _, str1: String, str2: String) =>
str1.equalsIgnoreCase(str2)
},
Expand Down
Loading