Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct { // DiscardInvalidProperties determines how invalid properties are decoded. // If true, when the parser successfully decodes a property, but fails to // decode its value or a component, then the entire property is discarded. // If false, then as much information as possible is retained; any value or // component that fails will be emitted as the zero value for the type. DiscardInvalidProperties bool }
Decoder decodes a stream of bytes into a rbxfile.Root according to the rbxlx format.
type Encoder ¶
type Encoder struct { // ExcludeReferent determines whether the "referent" attribute should be // excluded from Item tags when encoding. ExcludeReferent bool // ExcludeExternal determines whether standard <External> tags should be // excluded from the root tag when encoding. ExcludeExternal bool // ExcludeMetadata determines whether <Meta> tags should be excluded while // encoding. ExcludeMetadata bool // Prefix is a string that appears at the start of each line in the // document. The prefix is added after each newline. Newlines are added // automatically when either Prefix or Indent is not empty. Prefix string // Indent is a string that indicates one level of indentation. A sequence of // indents will appear after the Prefix, an amount equal to the current // nesting depth in the markup. Indent string // NoDefaultIndent sets how Indent is interpreted when Indent is an empty // string. If false, an empty Indent will be interpreted as "\t". NoDefaultIndent bool // Suffix is a string that appears at the very end of the document. This // string is appended to the end of the file, after the root tag. Suffix string // ExcludeRoot determines whether the root tag should be excluded when // encoding. This can be combined with Prefix to write documents in-line. ExcludeRoot bool }
Encoder encodes a rbxfile.Root into a stream of bytes according to the rbxlx format.
Click to show internal directories.
Click to hide internal directories.