webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Public Member Functions | |
id () | |
Static Public Member Functions | |
static | nameFromExt ($ext) |
static | compile (HyperLanguage $lang) |
static | compileFromName ($lang) |
Public Attributes | |
const | NAME = 1 |
const | VERSION = 2 |
const | AUTHOR = 10 |
const | WEBSITE = 5 |
const | EMAIL = 6 |
Protected Member Functions | |
setCaseInsensitive ($value) | |
addStates (array $states) | |
getState ($key) | |
removeState ($key) | |
addRules (array $rules) | |
getRule ($key) | |
removeRule ($key) | |
addMappings (array $mappings) | |
getMapping ($key) | |
removeMapping ($key) | |
setInfo (array $info) | |
setExtensions (array $extensions) | |
addPostprocessing ($rule, HyperLanguage $language) | |
Static Protected Member Functions | |
static | exists ($lang) |
static | fromName ($lang) |
Abstract base class of all Hyperlight language definitions.
In order to define a new language definition, this class is inherited. The only function that needs to be overridden is the constructor. Helper functions from the base class can then be called to construct the grammar and store additional information. The name of the subclass must be of the schema {Lang}Language, where {Lang} is a short, unique name for the language starting with a capital letter and continuing in lower case. For example, PhpLanguage is a valid name. The language definition must reside in a file located at languages/{lang}.php. Here, {lang} is the all-lowercase spelling of the name, e.g. languages/php.php.
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
HyperLanguage::id | ( | ) |
|
static |
Retrieves a language definition name based on a file extension.
Uses the contents of the languages/filetypes file to guess the language definition name from a file name extension. This file has to be generated using the collect-filetypes.php script every time the language definitions have been changed.
string | $ext | the file name extension. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const HyperLanguage::AUTHOR = 10 |
const HyperLanguage::EMAIL = 6 |
const HyperLanguage::NAME = 1 |
Indices for information.
const HyperLanguage::VERSION = 2 |
const HyperLanguage::WEBSITE = 5 |