Note

You are not reading the most recent version of this documentation. 1.4.7 is the latest version available.

Coco Abstract Syntax Tree

Attribute

A single attribute in a Coco file, e.g. @runtime(.SingleThreaded).

All Of:

BaseNode

Properties:
  • arguments (Array[RenderedValue]) – The arguments to the attribute (e.g. .SingleThreaded).
  • decl (Object) – The declaration of the attribute (e.g. Base.runtime).
  • kind ("Attribute") –
BaseNode
Properties:
Decl
All Of:

BaseNode

Properties:
  • fully_qualified_name (String) –
  • metadata (Metadata) –
  • name (String) –
  • decls (Array[Decl]) –
Metadata
Properties:cognitive_complexity (Integer) –
Package
Properties:
  • name (String) – The name of the package.
  • modules (Array[Decl]) –
  • root_directory (String) –
Root
Properties:
  • $schema (String) – The schema that this document conforms to.
  • packages (Array[Package]) –
SourceLocation

A single location

Properties:
  • column (Integer) – The 1-based column
  • line (Integer) – The 1-based line
SourceRange

A range in a document. The range is half-open: it includes the start but excludes the end.

Properties:
  • start (SourceLocation) –
  • file (String) – The file that this range is in, relative to the Coco.toml file. If this property is not present, the file can be inferred by going to the parent of this node and looking at its file, continuing until a file is found.
  • end (SourceLocation) –