var searchIndex = {}; searchIndex["syntect"] = {"doc":"Welcome to the syntect docs.\nThese are still a work in progress but a lot of the important things have\nbeen documented already.","items":[[4,"LoadingError","syntect","Common error type used by syntax and theme loading",null,null],[13,"WalkDir","","error finding all the files in a directory",0,null],[13,"Io","","error reading a file",0,null],[13,"ParseSyntax","","a syntax file was invalid in some way",0,null],[13,"ParseTheme","","a theme file was invalid in some way",0,null],[13,"ReadSettings","","a theme's Plist syntax was invalid in some way",0,null],[13,"BadPath","","A path given to a method was invalid.\nPossibly because it didn't reference a file or wasn't UTF-8.",0,null],[0,"highlighting","","Everything having to do with turning parsed text into styled text.\nYou might want to check out `Theme` for its handy text-editor related\nsettings like selection colour, `ThemeSet` for loading themes,\nas well as things starting with `Highlight` for how to highlight text.",null,null],[3,"ScopeSelector","syntect::highlighting","A single selector consisting of a stack to match and a possible stack to exclude from being matched.\nYou probably want `ScopeSelectors` which is this but with union support.",null,null],[3,"ScopeSelectors","","A selector set that matches anything matched by any of its component selectors.\nSee [The TextMate Docs](https://manual.macromates.com/en/scope_selectors) for how these\nwork.",null,null],[12,"selectors","","the selectors, if any of them match, this matches",1,null],[3,"Style","","The foreground, background and font style",null,null],[12,"foreground","","Foreground color.",2,null],[12,"background","","Background color.",2,null],[12,"font_style","","Style of the font.",2,null],[3,"StyleModifier","","A change to a `Style` applied incrementally by a theme rule.",null,null],[12,"foreground","","Foreground color.",3,null],[12,"background","","Background color.",3,null],[12,"font_style","","Style of the font.",3,null],[3,"Color","","RGBA colour, these numbers come directly from the theme so\nfor now you might have to do your own colour space conversion if you are outputting\na different colour space from the theme. This can be a problem because some Sublime\nthemes use sRGB and some don't. This is specified in an attribute syntect doesn't parse yet.",null,null],[12,"r","","Red component",4,null],[12,"g","","Green component",4,null],[12,"b","","Blue component",4,null],[12,"a","","Alpha component",4,null],[3,"FontStyle","","This can be a combination of `FONT_STYLE_BOLD`, `FONT_STYLE_UNDERLINE` and `FONT_STYLE_ITALIC`",null,null],[3,"Theme","","A theme parsed from a `.tmTheme` file.\nContains fields useful for a theme list as well as `settings` for styling your editor.",null,null],[12,"name","","",5,null],[12,"author","","",5,null],[12,"settings","","",5,null],[12,"scopes","","",5,null],[3,"ThemeSettings","","Various properties meant to be used to style a text editor.\nBasically all the styles that aren't directly applied to text like selection colour.\nUse this to make your editor UI match the highlighted text.",null,null],[12,"foreground","","Foreground color for the view.",6,null],[12,"background","","Backgound color of the view.",6,null],[12,"caret","","Color of the caret.",6,null],[12,"line_highlight","","Color of the line the caret is in.\nOnly used when the `higlight_line` setting is set to `true`.",6,null],[12,"bracket_contents_foreground","","Color of bracketed sections of text when the caret is in a bracketed section.\nOnly applied when the `match_brackets` setting is set to `true`.",6,null],[12,"bracket_contents_options","","Controls certain options when the caret is in a bracket section.\nOnly applied when the `match_brackets` setting is set to `true`.",6,null],[12,"brackets_foreground","","Foreground color of the brackets when the caret is next to a bracket.\nOnly applied when the `match_brackets` setting is set to `true`.",6,null],[12,"brackets_background","","Background color of the brackets when the caret is next to a bracket.\nOnly applied when the `match_brackets` setting is set to `true`.",6,null],[12,"brackets_options","","Controls certain options when the caret is next to a bracket.\nOnly applied when the match_brackets setting is set to `true`.",6,null],[12,"tags_foreground","","Color of tags when the caret is next to a tag.\nOnly used when the `match_tags` setting is set to `true`.",6,null],[12,"tags_options","","Controls certain options when the caret is next to a tag.\nOnly applied when the match_tags setting is set to `true`.",6,null],[12,"find_highlight","","Background color of regions matching the current search.",6,null],[12,"find_highlight_foreground","","Background color of regions matching the current search.",6,null],[12,"gutter","","Background color of the gutter.",6,null],[12,"gutter_foreground","","Foreground color of the gutter.",6,null],[12,"selection","","Color of the selection regions.",6,null],[12,"selection_background","","Background color of the selection regions.",6,null],[12,"selection_border","","Color of the selection regions border.",6,null],[12,"inactive_selection","","Color of inactive selections (inactive view).",6,null],[12,"guide","","Color of the guides displayed to indicate nesting levels.",6,null],[12,"active_guide","","Color of the guide lined up with the caret.\nOnly applied if the `indent_guide_options` setting is set to `draw_active`.",6,null],[12,"stack_guide","","Color of the current guideā€™s parent guide level.\nOnly used if the `indent_guide_options` setting is set to `draw_active`.",6,null],[12,"highlight","","Background color for regions added via `sublime.add_regions()`\nwith the `sublime.DRAW_OUTLINED` flag added.",6,null],[12,"highlight_foreground","","Foreground color for regions added via `sublime.add_regions()`\nwith the `sublime.DRAW_OUTLINED` flag added.",6,null],[3,"ThemeItem","","A component of a theme meant to highlight a specific thing (e.g string literals)\nin a certain way.",null,null],[12,"scope","","Target scope name.",7,null],[12,"style","","",7,null],[3,"Highlighter","","Basically a wrapper around a `Theme` preparing it to be used for highlighting.\nThis is part of the API to preserve the possibility of caching\nmatches of the selectors of the theme on various scope paths\nor setting up some kind of accelerator structure.",null,null],[3,"HighlightState","","Keeps a stack of scopes and styles as state between highlighting different lines.\nIf you are highlighting an entire file you create one of these at the start and use it\nall the way to the end.",null,null],[12,"path","","",8,null],[3,"HighlightIterator","","Highlights a line of parsed code given a `HighlightState`\nand line of changes from the parser.",null,null],[3,"ThemeSet","","",null,null],[12,"themes","","",9,null],[4,"SettingsError","","An error parsing a settings file",null,null],[13,"Plist","","Incorrect Plist syntax",10,null],[4,"UnderlineOption","","",null,null],[13,"None","","",11,null],[13,"Underline","","",11,null],[13,"StippledUnderline","","",11,null],[13,"SquigglyUnderline","","",11,null],[4,"ParseThemeError","","",null,null],[13,"IncorrectUnderlineOption","","",12,null],[13,"IncorrectFontStyle","","",12,null],[13,"IncorrectColor","","",12,null],[13,"IncorrectSyntax","","",12,null],[13,"IncorrectSettings","","",12,null],[13,"UndefinedSettings","","",12,null],[13,"UndefinedScopeSettings","","",12,null],[13,"ColorShemeScopeIsNotObject","","",12,null],[13,"ColorShemeSettingsIsNotObject","","",12,null],[13,"ScopeSelectorIsNotString","","",12,null],[13,"DuplicateSettings","","",12,null],[13,"ScopeParse","","",12,null],[11,"decode","","",13,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",13,null],[11,"default","","",13,{"inputs":[],"output":{"name":"scopeselector"}}],[11,"eq","","",13,null],[11,"ne","","",13,null],[11,"clone","","",13,null],[11,"fmt","","",13,null],[11,"decode","","",1,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",1,null],[11,"default","","",1,{"inputs":[],"output":{"name":"scopeselectors"}}],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"does_match","","Checks if this selector matches a given scope stack.\nSee `ScopeSelectors#does_match` for more info.",13,null],[11,"from_str","","Parses a scope prefix followed optionally by a " - " and then a scope prefix to exclude",13,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"does_match","","checks if any of these selectors match the given scope stack\nif so it returns a match score, higher match scores are stronger\nmatches. Scores are ordered according to the rules found\nat https://manual.macromates.com/en/scope_selectors",1,null],[11,"from_str","","Parses a series of selectors separated by commas",1,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",10,null],[11,"from","","",10,{"inputs":[{"name":"plisterror"}],"output":{"name":"settingserror"}}],[11,"decode","","",2,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"clone","","",2,null],[11,"fmt","","",2,null],[11,"decode","","",3,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",3,null],[11,"eq","","",3,null],[11,"ne","","",3,null],[11,"clone","","",3,null],[11,"default","","",3,{"inputs":[],"output":{"name":"stylemodifier"}}],[11,"fmt","","",3,null],[11,"decode","","",4,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",4,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"hash","","",14,null],[11,"cmp","","",14,null],[11,"partial_cmp","","",14,null],[11,"lt","","",14,null],[11,"le","","",14,null],[11,"gt","","",14,null],[11,"ge","","",14,null],[11,"clone","","",14,null],[11,"eq","","",14,null],[11,"ne","","",14,null],[11,"decode","","",14,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",14,null],[11,"fmt","","",14,null],[11,"empty","","Returns an empty set of flags.",14,{"inputs":[],"output":{"name":"fontstyle"}}],[11,"all","","Returns the set containing all flags.",14,{"inputs":[],"output":{"name":"fontstyle"}}],[11,"bits","","Returns the raw value of the flags currently stored.",14,null],[11,"from_bits","","Convert from underlying bit representation, unless that\nrepresentation contains bits that do not correspond to a flag.",14,{"inputs":[{"name":"u8"}],"output":{"name":"option"}}],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any bits\nthat do not correspond to flags.",14,{"inputs":[{"name":"u8"}],"output":{"name":"fontstyle"}}],[11,"is_empty","","Returns `true` if no flags are currently stored.",14,null],[11,"is_all","","Returns `true` if all flags are currently set.",14,null],[11,"intersects","","Returns `true` if there are flags common to both `self` and `other`.",14,null],[11,"contains","","Returns `true` all of the flags in `other` are contained within `self`.",14,null],[11,"insert","","Inserts the specified flags in-place.",14,null],[11,"remove","","Removes the specified flags in-place.",14,null],[11,"toggle","","Toggles the specified flags in-place.",14,null],[11,"bitor","","Returns the union of the two sets of flags.",14,null],[11,"bitxor","","Returns the left flags, but with all the right flags toggled.",14,null],[11,"bitand","","Returns the intersection between the two sets of flags.",14,null],[11,"sub","","Returns the set difference of the two sets of flags.",14,null],[11,"not","","Returns the complement of this set of flags.",14,null],[11,"from_iter","","",14,{"inputs":[{"name":"t"}],"output":{"name":"fontstyle"}}],[11,"apply","","Applies a change to this style, yielding a new changed style",2,null],[11,"decode","","",5,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",5,null],[11,"default","","",5,{"inputs":[],"output":{"name":"theme"}}],[11,"fmt","","",5,null],[11,"decode","","",6,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",6,null],[11,"default","","",6,{"inputs":[],"output":{"name":"themesettings"}}],[11,"fmt","","",6,null],[11,"decode","","",7,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",7,null],[11,"default","","",7,{"inputs":[],"output":{"name":"themeitem"}}],[11,"fmt","","",7,null],[11,"decode","","",11,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",11,null],[11,"fmt","","",11,null],[11,"fmt","","",12,null],[11,"from","","",12,{"inputs":[{"name":"parsescopeerror"}],"output":{"name":"parsethemeerror"}}],[11,"default","","",11,{"inputs":[],"output":{"name":"underlineoption"}}],[11,"default","","",14,{"inputs":[],"output":{"name":"fontstyle"}}],[11,"from_str","","",11,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"from_str","","",14,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"from_str","","",4,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",15,null],[11,"eq","","",8,null],[11,"ne","","",8,null],[11,"clone","","",8,null],[11,"fmt","","",8,null],[11,"fmt","","",16,null],[11,"new","","Note that the `Highlighter` is not stored, it is used to construct the initial\nstack of styles. Most of the time you'll want to pass an empty stack as `initial_stack`\nbut see the docs for `HighlightState` for discussion of advanced caching use cases.",8,{"inputs":[{"name":"highlighter"},{"name":"scopestack"}],"output":{"name":"highlightstate"}}],[11,"new","","",16,null],[11,"next","","Yields the next token of text and the associated `Style` to render that text with.\nthe concatenation of the strings in each token will make the original string.",16,null],[11,"new","","",15,{"inputs":[{"name":"theme"}],"output":{"name":"highlighter"}}],[11,"get_default","","The default style in the absence of any matched rules.\nBasically what plain text gets highlighted as.",15,null],[11,"get_style","","Figures out which scope selector in the theme best matches this scope stack.\nIt only returns any changes to the style that should be applied when the top element\nis pushed on to the stack. These actually aren't guaranteed to be different than the current\nstyle. Basically what this means is that you have to gradually apply styles starting with the\ndefault and working your way up the stack in order to get the correct style.",15,null],[11,"decode","","",9,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",9,null],[11,"fmt","","",9,null],[11,"discover_theme_paths","","Returns all the themes found in a folder, good for enumerating before loading one with get_theme",9,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[11,"get_theme","","Loads a theme given a path to a .tmTheme file",9,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[11,"load_from_folder","","Loads all the themes in a folder",9,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[17,"BLACK","","Pre-defined convenience colour",null,null],[17,"WHITE","","Pre-defined convenience colour",null,null],[17,"FONT_STYLE_BOLD","","A bitfield constant FontStyle",null,null],[17,"FONT_STYLE_UNDERLINE","","A bitfield constant FontStyle",null,null],[17,"FONT_STYLE_ITALIC","","A bitfield constant FontStyle",null,null],[0,"parsing","syntect","Everything about parsing text into text annotated with scopes.\nThe most important struct here is `SyntaxSet`, check out the docs for that.",null,null],[3,"SyntaxSet","syntect::parsing","A syntax set holds a bunch of syntaxes and manages\nloading them and the crucial operation of *linking*.",null,null],[12,"syntaxes","","",17,null],[12,"is_linked","","",17,null],[3,"SCOPE_REPO","","The global scope repo, exposed in case you want to minimize locking and unlocking.\nShouldn't be necessary for you to use. See the `ScopeRepository` docs.",null,null],[3,"Scope","","A hierarchy of atoms with semi-standardized names\nused to accord semantic information to a specific piece of text.\nGenerally written with the atoms separated by dots.\nBy convention atoms are all lowercase alphanumeric.",null,null],[3,"ScopeRepository","","The structure used to keep of the mapping between scope atom numbers\nand their string names. It is only exposed in case you want to lock\n`SCOPE_REPO` and then allocate a whole bunch of scopes at once\nwithout thrashing the lock. It is recommended you just use `Scope::new()`",null,null],[3,"ScopeStack","","A stack/sequence of scopes. This is used both to represent hierarchies for a given\ntoken of text, as well as in `ScopeSelectors`. Press `ctrl+shift+p` in Sublime Text\nto see the scope stack at a given point.\nAlso see [the TextMate docs](https://manual.macromates.com/en/scope_selectors).",null,null],[3,"MatchPower","","Wrapper to get around the fact Rust f64 doesn't implement Ord\nand there is no non-NaN float type",null,null],[12,"0","","",18,null],[3,"ParseState","","Keeps the current parser state (the internal syntax interpreter stack) between lines of parsing.\nIf you are parsing an entire file you create one of these at the start and use it\nall the way to the end.",null,null],[4,"ParseSyntaxError","","",null,null],[13,"InvalidYaml","","Invalid YAML file syntax, or at least something yaml_rust can't handle",19,null],[13,"EmptyFile","","The file must contain at least on YAML document",19,null],[13,"MissingMandatoryKey","","Some keys are required for something to be a valid `.sublime-syntax`",19,null],[13,"RegexCompileError","","Invalid regex",19,null],[13,"InvalidScope","","A scope that syntect's scope implementation can't handle",19,null],[13,"BadFileRef","","A reference to another file that is invalid",19,null],[13,"MainMissing","","Syntaxes must have a context named "main"",19,null],[13,"TypeMismatch","","Some part of the YAML file is the wrong type (e.g a string but should be a list)\nSorry this doesn't give you any way to narrow down where this is.\nMaybe use Sublime Text to figure it out.",19,null],[4,"ParseScopeError","","Not all strings are valid scopes",null,null],[13,"TooLong","","Due to a limitation of the current optimized internal representation\nscopes can be at most 8 atoms long",20,null],[13,"TooManyAtoms","","The internal representation uses 16 bits per atom, so if all scopes ever\nused by the program have more than 2^16-2 atoms, things break",20,null],[4,"ScopeStackOp","","A change to a scope stack. Generally `Noop` is only used internally and you don't have\nto worry about ever getting one back from a public function.\nUse `ScopeStack#apply` to apply this change.",null,null],[13,"Push","","",21,null],[13,"Pop","","",21,null],[13,"Noop","","",21,null],[0,"syntax_definition","","This module contains data structures for representing syntax definitions.\nEverything is public because I want this library to be useful in super\nintegrated cases like text editors and I have no idea what kind of monkeying\nyou might want to do with the data. Perhaps parsing your own syntax format\ninto this data structure?",null,null],[3,"SyntaxDefinition","syntect::parsing::syntax_definition","The main data structure representing a syntax definition loaded from a\n`.sublime-syntax` file. You'll probably only need these as references\nto be passed around to parsing code.",null,null],[12,"name","","",22,null],[12,"file_extensions","","",22,null],[12,"scope","","",22,null],[12,"first_line_match","","",22,null],[12,"hidden","","",22,null],[12,"variables","","",22,null],[12,"contexts","","",22,null],[3,"Context","","",null,null],[12,"meta_scope","","",23,null],[12,"meta_content_scope","","",23,null],[12,"meta_include_prototype","","",23,null],[12,"uses_backrefs","","",23,null],[12,"patterns","","",23,null],[3,"MatchIter","","Used to iterate over all the match patterns in a context.\nBasically walks the tree of patterns and include directives\nin the correct order.",null,null],[3,"MatchPattern","","",null,null],[12,"has_captures","","",24,null],[12,"regex_str","","",24,null],[12,"regex","","",24,null],[12,"scope","","",24,null],[12,"captures","","",24,null],[12,"operation","","",24,null],[12,"with_prototype","","",24,null],[3,"LinkerLink","","This wrapper only exists so that I can implement a serialization\ntrait that crashes if you try and serialize this.",null,null],[12,"link","","",25,null],[4,"Pattern","","",null,null],[13,"Match","","",26,null],[13,"Include","","",26,null],[4,"ContextReference","","",null,null],[13,"Named","","",27,null],[13,"ByScope","","",27,null],[12,"scope","syntect::parsing::syntax_definition::ContextReference","",27,null],[12,"sub_context","","",27,null],[13,"File","syntect::parsing::syntax_definition","",27,null],[12,"name","syntect::parsing::syntax_definition::ContextReference","",27,null],[12,"sub_context","","",27,null],[13,"Inline","syntect::parsing::syntax_definition","",27,null],[13,"Direct","","",27,null],[4,"MatchOperation","","",null,null],[13,"Push","","",28,null],[13,"Set","","",28,null],[13,"Pop","","",28,null],[13,"None","","",28,null],[5,"context_iter","","Returns an iterator over all the match patterns in this context.\nIt recursively follows include directives. Can only be run on\ncontexts that have already been linked up.",null,{"inputs":[{"name":"contextptr"}],"output":{"name":"matchiter"}}],[6,"CaptureMapping","","",null,null],[6,"ContextPtr","","",null,null],[11,"decode","","",22,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",22,null],[11,"fmt","","",22,null],[11,"decode","","",23,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",23,null],[11,"fmt","","",23,null],[11,"decode","","",26,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",26,null],[11,"fmt","","",26,null],[11,"decode","","",29,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",29,null],[11,"fmt","","",29,null],[11,"fmt","","",24,null],[11,"fmt","","",25,null],[11,"decode","","",27,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",27,null],[11,"fmt","","",27,null],[11,"decode","","",28,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",28,null],[11,"fmt","","",28,null],[11,"next","","",29,null],[11,"match_at","","Returns the match pattern at an index, panics if the thing isn't a match pattern",23,null],[11,"match_at_mut","","Returns a mutable reference, otherwise like `match_at`",23,null],[11,"resolve","","find the pointed to context, panics if ref is not linked",27,null],[11,"regex_with_substitutes","","substitutes back-refs in Regex with regions from s\nused for match patterns which refer to captures from the pattern\nthat pushed them.",24,null],[11,"compile_with_refs","","Used by the parser to compile a regex which needs to reference\nregions from another matched pattern.",24,null],[11,"ensure_compiled_if_possible","","Makes sure the regex is compiled if it doesn't have captures.\nMay compile the regex if it isn't, panicing if compilation fails.",24,null],[11,"encode","","",24,null],[11,"decode","","",24,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"encode","","",25,null],[11,"decode","","",25,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"fmt","syntect::parsing","",19,null],[11,"load_from_str","syntect::parsing::syntax_definition","In case you want to create your own SyntaxDefinition's in memory from strings.\nGenerally you should use a `SyntaxSet`",22,{"inputs":[{"name":"str"},{"name":"bool"}],"output":{"name":"result"}}],[11,"decode","syntect::parsing","",17,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",17,null],[11,"fmt","","",17,null],[11,"new","","",17,{"inputs":[],"output":{"name":"syntaxset"}}],[11,"load_from_folder","","Convenience constructor calling `new` and then `load_syntaxes` on the resulting set\ndefaults to lines given not including newline characters, see the\n`load_syntaxes` method docs for an explanation as to why this might not be the best.\nIt also links all the syntaxes together, see `link_syntaxes` for what that means.",17,{"inputs":[{"name":"p"}],"output":{"name":"result"}}],[11,"load_syntaxes","","Loads all the .sublime-syntax files in a folder into this syntax set.\nIt does not link the syntaxes, in case you want to serialize this syntax set.",17,null],[11,"load_plain_text_syntax","","Rarely useful method that loads in a syntax with no highlighting rules for plain text.\nExists mainly for adding the plain text syntax to syntax set dumps, because for some\nreason the default Sublime plain text syntax is still in `.tmLanguage` format.",17,null],[11,"find_syntax_by_scope","","Finds a syntax by its default scope, for example `source.regexp` finds the regex syntax.\nThis and all similar methods below do a linear search of syntaxes, this should be fast\nbecause there aren't many syntaxes, but don't think you can call it a bajillion times per second.",17,null],[11,"find_syntax_by_name","","",17,null],[11,"find_syntax_by_extension","","",17,null],[11,"find_syntax_by_token","","Searches for a syntax first by extension and then by case-insensitive name\nuseful for things like Github-flavoured-markdown code block highlighting where\nall you have to go on is a short token given by the user",17,null],[11,"find_syntax_plain_text","","Finds a syntax for plain text, which usually has no highlighting rules.\nGood as a fallback when you can't find another syntax but you still want\nto use the same highlighting pipeline code.",17,null],[11,"link_syntaxes","","This links all the syntaxes in this set directly with pointers for performance purposes.\nIt is necessary to do this before parsing anything with these syntaxes.\nHowever, it is not possible to serialize a syntax set that has been linked,\nwhich is why it isn't done by default, except by the load_from_folder constructor.\nThis operation is idempotent, but takes time even on already linked syntax sets.",17,null],[11,"deref","","",30,null],[11,"default","","",31,{"inputs":[],"output":{"name":"scope"}}],[11,"eq","","",31,null],[11,"ne","","",31,null],[11,"clone","","",31,null],[11,"fmt","","",20,null],[11,"fmt","","",32,null],[11,"decode","","",33,{"inputs":[{"name":"__d"}],"output":{"name":"result"}}],[11,"encode","","",33,null],[11,"default","","",33,{"inputs":[],"output":{"name":"scopestack"}}],[11,"eq","","",33,null],[11,"ne","","",33,null],[11,"clone","","",33,null],[11,"fmt","","",33,null],[11,"eq","","",21,null],[11,"ne","","",21,null],[11,"clone","","",21,null],[11,"fmt","","",21,null],[11,"build","","",32,null],[11,"to_string","","",32,null],[11,"atom_str","","Return the string for an atom number returned by `Scope#atom_at`",32,null],[11,"new","","Parses a `Scope` from a series of atoms separated by\n`.` characters. Example: `Scope::new("meta.rails.controller")`",31,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"atom_at","","Gets the atom number at a given index.\nI can't think of any reason you'd find this useful.\nIt is used internally for turning a scope back into a string.",31,null],[11,"len","","return the number of atoms in the scope",31,null],[11,"build_string","","returns a string representation of this scope, this requires locking a\nglobal repo and shouldn't be done frequently.",31,null],[11,"is_prefix_of","","Tests if this scope is a prefix of another scope.\nNote that the empty scope is always a prefix.",31,null],[11,"from_str","","",31,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",31,null],[11,"fmt","","",31,null],[11,"encode","","",31,null],[11,"decode","","",31,{"inputs":[{"name":"d"}],"output":{"name":"result"}}],[11,"eq","","",18,null],[11,"ne","","",18,null],[11,"partial_cmp","","",18,null],[11,"lt","","",18,null],[11,"le","","",18,null],[11,"gt","","",18,null],[11,"ge","","",18,null],[11,"clone","","",18,null],[11,"fmt","","",18,null],[11,"cmp","","",18,null],[11,"new","","",33,{"inputs":[],"output":{"name":"scopestack"}}],[11,"from_vec","","",33,{"inputs":[{"name":"vec"}],"output":{"name":"scopestack"}}],[11,"push","","",33,null],[11,"pop","","",33,null],[11,"apply","","Modifies this stack according to the operation given\nuse this to create a stack from a `Vec` of changes\ngiven by the parser.",33,null],[11,"debug_print","","Prints out each scope in the stack separated by spaces\nand then a newline. Top of the stack at the end.",33,null],[11,"bottom_n","","Return the bottom n elements of the stack.\nEquivalent to &scopes[0..n] on a Vec",33,null],[11,"as_slice","","Return a slice of the scopes in this stack",33,null],[11,"len","","Return the height/length of this stack",33,null],[11,"does_match","","checks if this stack as a selector matches the given stack\nif so it returns a match score, higher match scores are stronger\nmatches. Scores are ordered according to the rules found\nat https://manual.macromates.com/en/scope_selectors",33,null],[11,"from_str","","Parses a scope stack from a whitespace separated list of scopes.",33,{"inputs":[{"name":"str"}],"output":{"name":"result"}}],[11,"fmt","","",33,null],[11,"clone","","",34,null],[11,"fmt","","",34,null],[11,"new","","Create a state from a syntax, keeps its own reference counted\npointer to the main context of the syntax.",34,{"inputs":[{"name":"syntaxdefinition"}],"output":{"name":"parsestate"}}],[11,"parse_line","","Parses a single line of the file. Because of the way regex engines work you unfortunately\nhave to pass in a single line contigous in memory. This can be bad for really long lines.\nSublime Text avoids this by just not highlighting lines that are too long (thousands of characters).",34,null],[0,"util","syntect","Convenient utility methods, mostly for printing `syntect` data structures\nprettily to the terminal.",null,null],[5,"as_24_bit_terminal_escaped","syntect::util","Formats the styled fragments using 24-bit colour\nterminal escape codes. Meant for debugging and testing.\nIt's currently fairly inefficient in its use of escape codes.",null,null],[5,"debug_print_ops","","Print out the various push and pop operations in a vector\nwith visual alignment to the line. Obviously for debugging.",null,{"inputs":[{"name":"str"},{"name":"vec"}],"output":null}],[0,"dumps","syntect","Methods for dumping serializable structs to a compressed binary format\nThese are used to load and store the dumps used for fast startup times.",null,null],[5,"dump_binary","syntect::dumps","Dumps an object to a binary array in the same format as `dump_to_file`",null,{"inputs":[{"name":"t"}],"output":{"name":"vec"}}],[5,"dump_to_file","","Dumps an encodable object to a file at a given path. If a file already exists at that path\nit will be overwritten. The files created are encoded with the `bincode` crate and then\ncompressed with the `flate2` crate.",null,{"inputs":[{"name":"t"},{"name":"p"}],"output":{"name":"encodingresult"}}],[5,"from_binary","","Returns a fully loaded and linked syntax set from\na binary dump. Panics if the dump is invalid.",null,null],[5,"from_dump_file","","Returns a fully loaded and linked syntax set from\na binary dump file.",null,{"inputs":[{"name":"p"}],"output":{"name":"decodingresult"}}],[11,"load_defaults_nonewlines","syntect::parsing","Instantiates a new syntax set from a binary dump of\nSublime Text's default open source syntax definitions and then links it.\nThese dumps are included in this library's binary for convenience.\nThis method loads the version for parsing line strings with no `\\n` characters at the end.",17,{"inputs":[],"output":{"name":"syntaxset"}}],[11,"load_defaults_newlines","","Same as `load_defaults_nonewlines` but for parsing line strings with newlines at the end.\nThese are separate methods because thanks to linker garbage collection, only the serialized\ndumps for the method(s) you call will be included in the binary (each is ~200kb for now).",17,{"inputs":[],"output":{"name":"syntaxset"}}],[11,"load_defaults","syntect::highlighting","Loads the set of default themes\nCurrently includes (these are the keys for the map):",9,{"inputs":[],"output":{"name":"themeset"}}],[0,"easy","syntect","API wrappers for common use cases like highlighting strings and\nfiles without caring about intermediate semantic representation\nand caching.",null,null],[3,"HighlightLines","syntect::easy","Simple way to go directly from lines of text to coloured\ntokens.",null,null],[3,"HighlightFile","","Convenience struct containing everything you need to highlight a file.\nUse the `reader` to get the lines of the file and the `highlight_lines` to highlight them.\nSee the `new` method docs for more information.",null,null],[12,"reader","","",35,null],[12,"highlight_lines","","",35,null],[11,"new","","",36,{"inputs":[{"name":"syntaxdefinition"},{"name":"theme"}],"output":{"name":"highlightlines"}}],[11,"highlight","","Highlights a line of a file",36,null],[11,"new","","Constructs a file reader and a line highlighter to get you reading files as fast as possible.\nAuto-detects the syntax from the extension and constructs a `HighlightLines` with the correct syntax and theme.",35,{"inputs":[{"name":"p"},{"name":"syntaxset"},{"name":"theme"}],"output":{"name":"result"}}],[0,"html","syntect","Rendering highlighted code as HTML+CSS",null,null],[4,"ClassStyle","syntect::html","Only one style for now, I may add more class styles later.\nJust here so I don't have to change the API",null,null],[13,"Spaced","","The classes are the atoms of the scope separated by spaces\n(e.g `source.php` becomes `source php`).\nThis isn't that fast since it has to use the scope repository\nto look up scope names.",37,null],[4,"IncludeBackground","","Determines how background colour attributes are generated",null,null],[13,"No","","Don't include `background-color`, for performance or so that you can use your own background.",38,null],[13,"Yes","","Set background colour attributes on every node",38,null],[13,"IfDifferent","","Only set the `background-color` if it is different than the default (presumably set on a parent element)",38,null],[5,"highlighted_snippet_for_string","","Convenience method that combines `start_coloured_html_snippet`, `styles_to_coloured_html`\nand `HighlightLines` from `syntect::easy` to create a full highlighted HTML snippet for\na string (which can contain many lines).",null,{"inputs":[{"name":"str"},{"name":"syntaxdefinition"},{"name":"theme"}],"output":{"name":"string"}}],[5,"highlighted_snippet_for_file","","Convenience method that combines `start_coloured_html_snippet`, `styles_to_coloured_html`\nand `HighlightFile` from `syntect::easy` to create a full highlighted HTML snippet for\na file.",null,{"inputs":[{"name":"p"},{"name":"syntaxset"},{"name":"theme"}],"output":{"name":"result"}}],[5,"tokens_to_classed_html","","Output HTML for a line of code with `<span>` elements\nspecifying classes for each token. The span elements are nested\nlike the scope stack and the scopes are mapped to classes based\non the `ClassStyle` (see it's docs).",null,null],[5,"styles_to_coloured_html","","Output HTML for a line of code with `<span>` elements using inline\n`style` attributes to set the correct font attributes.\nThe `bg` attribute determines if the spans will have the `background-color`\nattribute set. See the `IncludeBackground` enum's docs.",null,null],[5,"start_coloured_html_snippet","","Returns a `<pre style="...">\\n` tag with the correct background color for the given theme.\nThis is for if you want to roll your own HTML output, you probably just want to use\n`highlighted_snippet_for_string`.",null,{"inputs":[{"name":"theme"}],"output":{"name":"string"}}],[11,"clone","","",37,null],[11,"eq","","",37,null],[11,"fmt","","",37,null],[11,"clone","","",38,null],[11,"eq","","",38,null],[11,"ne","","",38,null],[11,"fmt","","",38,null],[11,"fmt","syntect","",0,null],[11,"from","","",0,{"inputs":[{"name":"settingserror"}],"output":{"name":"loadingerror"}}],[11,"from","","",0,{"inputs":[{"name":"ioerror"}],"output":{"name":"loadingerror"}}],[11,"from","","",0,{"inputs":[{"name":"parsethemeerror"}],"output":{"name":"loadingerror"}}],[11,"from","","",0,{"inputs":[{"name":"parsesyntaxerror"}],"output":{"name":"loadingerror"}}]],"paths":[[4,"LoadingError"],[3,"ScopeSelectors"],[3,"Style"],[3,"StyleModifier"],[3,"Color"],[3,"Theme"],[3,"ThemeSettings"],[3,"ThemeItem"],[3,"HighlightState"],[3,"ThemeSet"],[4,"SettingsError"],[4,"UnderlineOption"],[4,"ParseThemeError"],[3,"ScopeSelector"],[3,"FontStyle"],[3,"Highlighter"],[3,"HighlightIterator"],[3,"SyntaxSet"],[3,"MatchPower"],[4,"ParseSyntaxError"],[4,"ParseScopeError"],[4,"ScopeStackOp"],[3,"SyntaxDefinition"],[3,"Context"],[3,"MatchPattern"],[3,"LinkerLink"],[4,"Pattern"],[4,"ContextReference"],[4,"MatchOperation"],[3,"MatchIter"],[3,"SCOPE_REPO"],[3,"Scope"],[3,"ScopeRepository"],[3,"ScopeStack"],[3,"ParseState"],[3,"HighlightFile"],[3,"HighlightLines"],[4,"ClassStyle"],[4,"IncludeBackground"]]}; initSearch(searchIndex);