Op.fromJson constructor

Op.fromJson(
  1. String json
)

Implementation

factory Op.fromJson(String json) => switch (json) {
      'Value' => OpBuiltin.value,
      'Var' => OpBuiltin.variable,
      'Slot' => OpBuiltin.slot,
      'Unknown' => OpBuiltin.unknown,
      '!' => OpBuiltin.not,
      'neg' => OpBuiltin.negate,
      '==' => OpBuiltin.equals,
      '!=' => OpBuiltin.notEquals,
      'in' => OpBuiltin.in_,
      '<' => OpBuiltin.lessThan,
      '<=' => OpBuiltin.lessThanOrEquals,
      '>' => OpBuiltin.greaterThan,
      '>=' => OpBuiltin.greaterThanOrEquals,
      '&&' => OpBuiltin.and,
      '||' => OpBuiltin.or,
      '+' => OpBuiltin.add,
      '-' => OpBuiltin.subtract,
      '*' => OpBuiltin.multiply,
      'contains' => OpBuiltin.contains,
      'containsAll' => OpBuiltin.containsAll,
      'containsAny' => OpBuiltin.containsAny,
      '.' => OpBuiltin.getAttribute,
      'has' => OpBuiltin.hasAttribute,
      'like' => OpBuiltin.like,
      'is' => OpBuiltin.is_,
      'if-then-else' => OpBuiltin.ifThenElse,
      'Set' => OpBuiltin.set,
      'Record' => OpBuiltin.record,
      _ => OpExtension(json),
    };