Struct syntect::parsing::syntax_definition::SyntaxDefinition [] [src]

pub struct SyntaxDefinition {
    pub name: String,
    pub file_extensions: Vec<String>,
    pub scope: Scope,
    pub first_line_match: Option<String>,
    pub hidden: bool,
    pub prototype: Option<ContextPtr>,
    pub variables: HashMap<String, String>,
    pub contexts: HashMap<String, ContextPtr>,
}

The main data structure representing a syntax definition loaded from a .sublime-syntax file. You'll probably only need these as references to be passed around to parsing code.

Some useful public fields are the name field which is a human readable name to display in syntax lists, and the hidden field which means hide this syntax from any lists because it is for internal use.

Fields

Filled in at link time to avoid serializing it multiple times

Methods

impl SyntaxDefinition
[src]

In case you want to create your own SyntaxDefinition's in memory from strings. Generally you should use a SyntaxSet

Trait Implementations

impl Clone for SyntaxDefinition
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for SyntaxDefinition
[src]

Formats the value using the given formatter.

impl Eq for SyntaxDefinition
[src]

impl PartialEq for SyntaxDefinition
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.