package liquid_syntax

  1. Overview
  2. Docs
include module type of struct include Tokens end
type whitespace_control = Tokens.whitespace_control =
  1. | Trim
  2. | White
type block_token = Tokens.block_token =
  1. | StatementStart of whitespace_control
  2. | StatementEnd of whitespace_control
  3. | ExpressionStart of whitespace_control
  4. | ExpressionEnd of whitespace_control
  5. | LiquidStart
  6. | RawText of Base.string
type operator = Tokens.operator =
  1. | Eq
  2. | Gte
  3. | Gt
  4. | Lte
  5. | Lt
  6. | Ne
  7. | Contains
type lex_value = Tokens.lex_value =
  1. | LexBool of Base.bool
  2. | LexString of Base.string
  3. | LexNumber of Base.float
  4. | LexId of Base.string Base.list
  5. | LexRange of Base.int * Base.int
  6. | LexNil
  7. | LexBlank
type lex_combiner = Tokens.lex_combiner =
  1. | LexAnd
  2. | LexOr
type lex_token = Tokens.lex_token =
  1. | If
  2. | EndIf
  3. | Unless
  4. | EndUnless
  5. | Case
  6. | EndCase
  7. | LexFor
  8. | LexEndFor
  9. | Capture
  10. | EndCapture
  11. | Paginate
  12. | EndPaginate
  13. | TableRow
  14. | EndTableRow
  15. | Raw
  16. | EndRaw
  17. | ElseIf
  18. | Else
  19. | When
  20. | LexForm
  21. | LexStyle
  22. | LexEndForm
  23. | LexEndStyle
  24. | LexInclude
  25. | LexRender
  26. | LexLayout
  27. | LexSection
  28. | LexBreak
  29. | LexContinue
  30. | Cycle
  31. | In
  32. | By
  33. | LexWith
  34. | LexAs
  35. | Assign
  36. | Increment
  37. | Decrement
  38. | Pipe
  39. | Colon
  40. | Equals
  41. | Comma
  42. | LexNone
  43. | Space
  44. | Newline
  45. | Operator of operator
  46. | LexText of Base.string
  47. | LexCombiner of lex_combiner
  48. | LexValue of lex_value
  49. | LexExpression of lex_token Base.list
  50. | EOS
module LiquidObject : sig ... end
module Object : sig ... end
val obj_as_list : 'a Object.t -> (Object.key * 'a) Base__List.t
module VariableContext : sig ... end
module Ctx : sig ... end
val idf : Base.String.t -> Base.String.t list
type id = Base.string Base.list
type value =
  1. | Bool of Base.bool
  2. | String of Base.string
  3. | Number of Base.float
  4. | Var of Base.string Base.list
  5. | List of value Base.list
  6. | Date of Date.t
  7. | Object of liquid_object
  8. | Nil
and liquid_object = value Object.t
type variable_context = value Ctx.t
type expression =
  1. | Value of value
  2. | Func of Base.string * expression Base.list
type operator_equation = value * operator * value
type combiner =
  1. | And
  2. | Or
type condition =
  1. | Combine of combiner * condition * condition
  2. | Equation of operator_equation
  3. | IsTruthy of value
  4. | Not of condition
  5. | Always of Base.bool
type for_params = {
  1. limit : Base.int;
  2. offset : Base.int;
  3. reved : Base.bool;
  4. cols : Base.int;
  5. is_tablerow : Base.bool;
}
type ast =
  1. | Capture of Base.string * ast
  2. | Block of ast Base.list
  3. | Test of condition * ast * ast Base.option
  4. | For of Base.string * value * for_params * ast * ast Base.option
  5. | Cycle of Base.string Base.option * Base.string Base.list
  6. | Expression of expression
  7. | Assignment of Base.string * expression
  8. | Text of Base.string
  9. | Break
  10. | Continue
  11. | Layout of Base.string Base.option
  12. | Include of Base.string
  13. | Section of Base.string
  14. | Render of Base.string * variable_context * ast Base.option
  15. | Paginate of id * Base.int * ast
  16. | Nothing
val list_of_range : lex_value -> int list
val liq_list_of_range : lex_value -> value
val lex_value_to_value : lex_value -> value
val for_params_default : for_params
type liquid_filter = variable_context -> value Base.list -> (value, Base.string) Base.Result.t
type liquid_filter_lookup = Base.string -> liquid_filter Base.option
val liquid_int : Base.Int.t -> value
val liquid_float : Base.float -> value
val pack_object : liquid_object -> value
OCaml

Innovation. Community. Security.