Skip to content

Source

[Source]

Wraps source text for parsing. Create from a file path with Source(path)? or from a string with Source.from_string(text).

class val Source

Constructors

create

[Source]

Load source text from a file. Errors if the file cannot be opened.

new val create(
  filepath: FilePath val)
: Source val^ ?

Parameters

Returns


from_string

[Source]

Create source from an in-memory string.

new val from_string(
  content': String val,
  path': String val = "")
: Source val^

Parameters

Returns


Public fields

let path: String val

[Source]


let content: String val

[Source]