class

Obelisk::TmThemeParser

Inherits Reference < Object

Parses TextMate .tmTheme files (XML plist format)

Constants

SCOPE_MAPPINGS = {"comment" => TokenType::Comment, "comment.line" => TokenType::CommentSingle, "comment.block" => TokenType::CommentMultiline, "string" => TokenType::LiteralString, "string.quoted.single" => TokenType::LiteralStringSingle, "string.quoted.double" => TokenType::LiteralStringDouble, "string.unquoted" => TokenType::LiteralStringOther, "string.interpolated" => TokenType::LiteralStringInterpol, "string.regexp" => TokenType::LiteralStringRegex, "constant.numeric" => TokenType::LiteralNumber, "constant.numeric.integer" => TokenType::LiteralNumberInteger, "constant.numeric.float" => TokenType::LiteralNumberFloat, "constant.numeric.hex" => TokenType::LiteralNumberHex, "constant.numeric.octal" => TokenType::LiteralNumberOct, "constant.numeric.binary" => TokenType::LiteralNumberBin, "keyword" => TokenType::Keyword, "keyword.control" => TokenType::KeywordReserved, "keyword.operator" => TokenType::OperatorWord, "keyword.other" => TokenType::Keyword, "variable" => TokenType::NameVariable, "variable.parameter" => TokenType::NameVariable, "variable.language" => TokenType::NameBuiltin, "variable.other" => TokenType::NameVariable, "entity.name.function" => TokenType::NameFunction, "entity.name.class" => TokenType::NameClass, "entity.name.type" => TokenType::NameClass, "entity.name.namespace" => TokenType::NameNamespace, "entity.name.tag" => TokenType::NameTag, "entity.other.attribute-name" => TokenType::NameAttribute, "constant" => TokenType::NameConstant, "constant.language" => TokenType::NameBuiltin, "constant.character.escape" => TokenType::LiteralStringEscape, "storage" => TokenType::KeywordType, "storage.type" => TokenType::KeywordType, "storage.modifier" => TokenType::KeywordReserved, "support" => TokenType::NameBuiltin, "support.function" => TokenType::NameBuiltin, "support.class" => TokenType::NameBuiltin, "support.type" => TokenType::NameBuiltin, "support.constant" => TokenType::NameBuiltin, "keyword.operator" => TokenType::Operator, "punctuation" => TokenType::Punctuation, "punctuation.separator" => TokenType::Punctuation, "punctuation.terminator" => TokenType::Punctuation, "invalid" => TokenType::Error, "invalid.illegal" => TokenType::Error, "invalid.deprecated" => TokenType::Error, "markup.heading" => TokenType::GenericHeading, "markup.bold" => TokenType::GenericStrong, "markup.italic" => TokenType::GenericEmph, "markup.underline" => TokenType::GenericEmph, "markup.deleted" => TokenType::GenericDeleted, "markup.inserted" => TokenType::GenericInserted}

Scope to TokenType mapping for common TextMate scopes

Constructors

new(content : String)
Source

Instance methods

parse(name : String) : Style
Source