Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.12 KB

lang.md

File metadata and controls

36 lines (27 loc) · 1.12 KB

Language

Templating language used in ytt is a slightly modified version of Starlark. Following modifications were made:

  • requires end keyword for block closing
    • hence no longer whitespace sensitive (except new line breaks)
  • does not allow use of pass keyword

Reference

Types

  • NoneType: None (equivalent to null in other languages)
  • Bool: True or False
  • Integer: 1
  • Float: 1.1
  • String: "string" Reference
  • Dictionary: {"a": 1, "b": "b"} Reference
  • List: [1, 2, {"a":3}] Reference
  • Tuple: (1, 2, "a")
  • Struct: struct.make(field1=123, field2="val2") Reference
  • TODO Set?
  • TODO YAMLFragment?
  • Annotation: @name arg1,arg2,keyword_arg3=123 Reference

Control flow

Libraries