Skip to content

highlight 'type names' #27

@Alexey-T

Description

@Alexey-T

these words are predefined type names. maybe HL them with different color?

base64
base85
boolean
country-2
country-3
country-subdivision
currency
date
date-time
decimal
decimal128
decimal64
duration
email
f32
f64
hostname
i128
i16
i32
i64
i8
idn-email
idn-hostname
ipv4
ipv6
irl
irl-reference
isize
number
regex
string
time
u128
u16
u32
u64
u8
url
url-reference
url-template
usize
uuid

docs:

Type Annotations

KDL supports type annotations on both values and nodes. These can be arbitrary, but can be used by individual implementations or use-cases to constrain KDL's basic types. A number of type names are also reserved to have specific meanings.

numbers (u8)10 (i32)20 myfloat=(f32)1.5 {
  strings (uuid)"123e4567-e89b-12d3-a456-426614174000" (date)"2021-02-03" filter=(regex)#"$\d+"#
  (author)person name=Alex
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions