mirror of
https://github.com/photonstorm/phaser
synced 2024-12-28 05:53:49 +00:00
21 lines
932 B
JavaScript
21 lines
932 B
JavaScript
|
PR.registerLangHandler(PR.createSimpleLexer([
|
|||
|
["pln", /^[\t\n\f\r ]+/, null, " \t\r\n"]
|
|||
|
], [
|
|||
|
["str", /^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/, null],
|
|||
|
["str", /^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/, null],
|
|||
|
["lang-css-str", /^url\(([^"')]*)\)/i],
|
|||
|
["kwd", /^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i, null],
|
|||
|
["lang-css-kw", /^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],
|
|||
|
["com", /^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],
|
|||
|
["com", /^(?:<\!--|--\>)/],
|
|||
|
["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
|
|||
|
["lit", /^#[\da-f]{3,6}/i],
|
|||
|
["pln", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],
|
|||
|
["pun", /^[^\s\w"']+/]
|
|||
|
]), ["css"]);
|
|||
|
PR.registerLangHandler(PR.createSimpleLexer([], [
|
|||
|
["kwd", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]
|
|||
|
]), ["css-kw"]);
|
|||
|
PR.registerLangHandler(PR.createSimpleLexer([], [
|
|||
|
["str", /^[^"')]+/]
|
|||
|
]), ["css-str"]);
|