2024-01-05 12:14:38 +00:00
import html from './html.mjs' ;
import sql from './sql.mjs' ;
import './javascript.mjs' ;
import './css.mjs' ;
2024-01-31 06:33:19 +00:00
const lang = Object . freeze ( { "displayName" : "Hack" , "fileTypes" : [ "hh" , "php" , "hack" ] , "foldingStartMarker" : "(/\\*|\\{\\s*$|<<<HTML)" , "foldingStopMarker" : "(\\*/|^\\s*\\}|^HTML;)" , "name" : "hack" , "patterns" : [ { "include" : "text.html.basic" } , { "include" : "#language" } ] , "repository" : { "attributes" : { "patterns" : [ { "begin" : "(<<)(?!<)" , "beginCaptures" : { "1" : { "name" : "punctuation.definition.attributes.php" } } , "end" : "(>>)" , "endCaptures" : { "1" : { "name" : "punctuation.definition.attributes.php" } } , "name" : "meta.attributes.php" , "patterns" : [ { "include" : "#comments" } , { "match" : "([A-Za-z_][A-Za-z0-9_]*)" , "name" : "entity.other.attribute-name.php" } , { "begin" : "(\\()" , "beginCaptures" : { "1" : { "name" : "punctuation.definition.parameters.begin.php" } } , "end" : "(\\))" , "endCaptures" : { "1" : { "name" : "punctuation.definition.parameters.end.php" } } , "patterns" : [ { "include" : "#language" } ] } ] } ] } , "class-builtin" : { "patterns" : [ { "captures" : { "1" : { "name" : "punctuation.separator.inheritance.php" } } , "match" : " ( ? i ) ( \ \ \ \ ) ? \ \ b ( st ( dClass | reamWrapper ) | R ( RD ( Graph | Creator | Updater ) | untimeException | e ( sourceBundle | cursive ( RegexIterator | Ca ( chingIterator | llbackFilterIterator ) | TreeIterator | Iterator ( Iterator ) ? | DirectoryIterator | FilterIterator | ArrayIterator ) | flect ( ion ( Method | Class | ZendExtension | Object | P ( arameter | roperty ) | Extension | Function ( Abstract ) ? ) ? | or ) | gexIterator ) | angeException ) | G ( ender \ \ Gender | lobIterator | magick ( Draw | Pixel ) ? ) | X ( sltProcessor | ML ( Reader | Writer ) | SLTProcessor ) | M ( ysqlndUh ( Connection | PreparedStatement ) | ongo ( Re ( sultException | gex ) | Grid ( fsFile | FS ( Cursor | File ) ? ) | BinData | C ( o ( de | llection ) | ursor ( Exception ) ? | lient ) | Timestamp | I ( nt ( 32 | 64 ) | d ) | D ( B ( Ref ) ? | ate ) | Pool | Log ) ? | u ( tex | ltipleIterator ) | e ( ssageFormatter | mcache ( d ) ? ) ) | Bad ( MethodCallException | FunctionCallException ) | tidy ( Node ) ? | S ( tackable | impleXML ( Iterator | Element ) | oap ( Server | Header | Client | Param | Var | Fault ) | NMP | CA ( _ ( SoapProxy | LocalProxy ) ) ? | p ( hinxClient | oofchecker | l ( M ( inHeap | axHeap ) | S ( tack | ubject ) | Heap | T ( ype | empFileObject ) | Ob ( server | jectStorage ) | DoublyLinkedList | PriorityQueue | Enum | Queue | Fi ( le ( Info | Object ) | xedArray ) ) ) | e ( ssionHandler ( Interface ) ? | ekableIterator | rializable ) | DO _ ( Model _ ( ReflectionDataObject | Type | Property ) | Sequence | D ( ata ( Object | Factory ) | AS _ ( Relational | XML ( _Document ) ? | Setting | ChangeSummary | Data ( Object | Factory ) ) ) | Exception | List ) | wish ( Result ( s ) ? | Search ) ? | VM ( Model ) ? | QLite ( Result | 3 ( Result | Stmt ) ? | Database | Unbuffered ) | AM ( Message | Connection ) ) | H ( ttp ( Re ( sponse | quest ( Pool ) ? ) | Message | InflateStream | DeflateStream | QueryString ) | aru ( Image | Outline | D ( oc | estination ) | Page | Encoder | Font | Annotation ) ) | Yaf _ ( R ( oute ( _ ( Re ( write | gex ) | Map | S ( tatic | imple | upervar ) | Interface ) | r ) | e ( sponse _Abstract | quest _ ( Simple | Http | Abstract ) | gistry ) ) | Session | Con ( troller _Abstract | fig _ ( Simple | Ini | Abstract ) ) | Dispatcher | Plugin _Abstract | Exception | View _ ( Simple | Interface ) | Loader | A ( ction _Abstract | pplication ) ) | N ( o ( RewindIterator | rmalizer ) | umberFormatter ) | C ( o ( nd | untable | llator ) | a ( chingIterator | llbackFilterIterator ) ) | T ( hread | okyoTyrant ( Table | Iterator | Query ) ? | ra ( nsliterator | versable ) ) | I ( n ( tlDateFormatter | validArgumentException | finiteIterator ) | terator ( Iterator | Aggregate ) ? | magick ( Draw | Pixel ( Iterator ) ? ) ? ) | php _user _filter | ZipArchive | O ( CI - ( Collection | Lob ) | ut ( erIterator | Of ( RangeException | BoundsException ) ) | verflowException ) | D ( irectory ( Iterator ) ? | omainException | OM ( XPath | N ( ode ( list ) ? | amedNodeMap ) | C ( haracterData | omment | dataSection ) | Text | Implementation | Document ( Fragment ) ? | ProcessingInstruction | E ( ntityReference | lement ) | Attr ) | ate ( Time ( Zone ) ? | Interval | Period ) ) | Un ( derflowException | expectedValueException ) | JsonSerializable | finfo | P ( har ( Data | FileInfo ) ? | DO ( Statement ) ? | arentIterator ) | E ( v ( S ( tat | ignal ) | Ch ( ild | eck ) | Timer | I ( o | dle ) | P ( eriodic | repare ) | Embed | Fork | Watcher | Loop ) ? | rrorException | xception | mptyIterator ) | V ( 8 Js ( Exception ) ? | arnish ( Stat | Log | Admin ) ) | KTaglib _ ( MPEG _ ( File | AudioProperties ) | Tag | ID3v2 _ ( Tag | Frame | AttachedPictureFrame ) ) | QuickHash ( StringIntHash | Int ( S ( tringHash | et ) | Hash ) ) | Fil ( terIterator | esystemIterator ) | mysqli ( _ ( stmt | driver | warning | result ) ) ? | W ( orker | eak ( Map | ref ) ) | L ( imitIterator | o ( cale | gicException ) | ua ( Closure ) ? | engthException | apack ) |
2024-01-05 12:14:38 +00:00
Sample case : $sql = "SELECT * FROM bar WHERE foo = '" . $variable . "'" ` , "match": ` '(?=((\\\\' ) | [ ^ ' "])*(" | $ ) ) ` , "name": "string.quoted.single.unclosed.sql" }, { "comment": ` Unclosed strings must be captured to avoid them eating the remainder of the PHP script
Sample case : $sql = "SELECT * FROM bar WHERE foo = '" . $variable . "'" ` , "match": ' ` ( ? = ( ( \ \ \ \ ` )|[^ ` "])*(" | $ ) ) ', "name": "string.quoted.other.backtick.unclosed.sql" }, { "begin": "' ", " end ": " '", "name": "string.quoted.single.sql", "patterns": [{ "include": "#interpolation" }] }, { "begin": "`", "end": "`", "name": "string.quoted.other.backtick.sql", "patterns": [{ "include": "#interpolation" }] }, { "include": "#interpolation" }, { "include": "source.sql" }] }, "sql-string-single-quoted": { "begin": "' \ \ s * ( ? = ( SELECT | INSERT | UPDATE | DELETE | CREATE | REPLACE | ALTER ) \ \ b ) ", " beginCaptures ": { " 0 ": { " name ": " punctuation . definition . string . begin . php " } }, " contentName ": " source . sql . embedded . php ", " end ": " '", "endCaptures": { "0": { "name": "punctuation.definition.string.end.php" } }, "name": "string.quoted.single.sql.php", "patterns": [{ "comment": "Open parens cause the next escaped character to not be captured as an\nescape character. Example: $x = ' SELECT ( ')' ; ", " match ": " \ \ ( ", " name ": " punctuation . definition . parameters . begin . bracket . round . php " }, { " match ": " # ( \ \ \ \ '|[^' ] ) * ( ? = '|$\\n?)", "name": "comment.line.number-sign.sql" }, { "match": "--(\\\\' | [ ^ '])*(?=' | $ \ \ n ? ) ", " name ": " comment . line . double - dash . sql " }, { " match ": " \ \ \ \ [ \ \ \ \ ' ` \" ]", "name": "constant.character.escape.php" }, { "comment": ` Unclosed strings must be captured to avoid them eating the remainder of the PHP script
Sample case : $sql = "SELECT * FROM bar WHERE foo = '" . $variable . "'" ` , "match": " ` ( ? = ( ( \ \ \ \ ` )|[^ ` '])*(' | $ ) ) ", " name ": " string . quoted . other . backtick . unclosed . sql " }, { " comment " : ` Unclosed strings must be captured to avoid them eating the remainder of the PHP script
2024-01-31 06:33:19 +00:00
Sample case : $sql = "SELECT * FROM bar WHERE foo = '" . $variable . "'" ` , "match": ` "(?=((\\\\" ) | [ ^ "'])*('|$))`, " name ": " string . quoted . double . unclosed . sql " }, { " include ": " source . sql " }] }, " string - double - quoted ": { " begin ": '" ', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "comment": "This contentName is just to allow the usage of \u201Cselect scope\u201D to select the string contents first, then the string with quotes", "contentName": "meta.string-contents.quoted.double.php", "end": ' "', " endCaptures ": { " 0 ": { " name ": " punctuation . definition . string . end . php " } }, " name ": " string . quoted . double . php ", " patterns ": [{ " include ": " # interpolation " }] }, " string - single - quoted ": { " begin ": " '", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.php" } }, "contentName": "meta.string-contents.quoted.single.php", "end": "' ", " endCaptures ": { " 0 ": { " name ": " punctuation . definition . string . end . php " } }, " name ": " string . quoted . single . php ", " patterns ": [{ " match ": " \ \ \ \ [ \ \ \ \ ' ] ", " name ": " constant . character . escape . php " }] }, " strings ": { " patterns ": [{ " include ": " # regex - double - quoted " }, { " include ": " # sql - string - double - quoted " }, { " include ": " # string - double - quoted " }, { " include ": " # regex - single - quoted " }, { " include ": " # sql - string - single - quoted " }, { " include ": " # string - single - quoted " }] }, " support ": { " patterns ": [{ " match ": " ( ? i ) \ \ bapc _ ( s ( tore | ma _info ) | c ( ompile _file | lear _cache | a ( s | che _info ) ) | inc | de ( c | fine _constants | lete ( _file ) ? ) | exists | fetch | load _constants | add | bin _ ( dump ( file ) ? | load ( file ) ? ) ) \ \ b ", " name ": " support . function . apc . php " }, { " match ": " ( ? i ) \ \ b ( s ( huffle | izeof | ort ) | n ( ext | at ( sort | casesort ) ) | c ( o ( unt | mpact ) | urrent ) | in _array | u ( sort | ksort | asort ) | p ( os | rev ) | e ( nd | ach | xtract ) | k ( sort | ey | rsort ) | list | a ( sort | r ( sort | ray ( _ ( s ( hift | um | plice | earch | lice ) | c ( h ( unk | ange _key _case ) | o ( unt _values | mbine ) ) | intersect ( _ ( u ( key | assoc ) | key | assoc ) ) ? | diff ( _ ( u ( key | assoc ) | key | assoc ) ) ? | u ( n ( shift | ique ) | intersect ( _ ( uassoc | assoc ) ) ? | diff ( _ ( uassoc | assoc ) ) ? ) | p ( op | ush | ad | roduct ) | values | key ( s | _exists ) | f ( il ( ter | l ( _keys ) ? ) | lip ) | walk ( _recursive ) ? | r ( e ( duce | place ( _recursive ) ? | verse ) | and ) | m ( ultisort | erge ( _recursive ) ? | ap ) ) ) ? ) ) | r ( sort | eset | ange ) ) \ \ b ", " name ": " support . function . array . php " }, { " match ": " ( ? i ) \ \ b ( s ( how _source | ys _getloadavg | leep ) | highlight _ ( string | file ) | con ( stant | nection _ ( status | timeout | aborted ) ) | time _ ( sleep _until | nanosleep ) | ignore _user _abort | d ( ie | efine ( d ) ? ) | u ( sleep | n ( iqid | pack ) ) | _ _halt _compiler | p ( hp _ ( strip _whitespace | check _syntax ) | ack ) | e ( val | xit ) | get _browser ) \ \ b ", " name ": " support . function . basic _functions . php " }, { " match ": " ( ? i ) \ \ bbc ( s ( cale | ub | qrt ) | comp | div | pow ( mod ) ? | add | m ( od | ul ) ) \ \ b ", " name ": " support . function . bcmath . php " }, { " match ": " ( ? i ) \ \ bbz ( c ( ompress | lose ) | open | decompress | err ( str | no | or ) | flush | write | read ) \ \ b ", " name ": " support . function . bz2 . php " }, { " match ": " ( ? i ) \ \ b ( GregorianToJD | cal _ ( to _jd | info | days _in _month | from _jd ) | unixtojd | jdto ( unix | jewish ) | easter _da ( ys | te ) | J ( ulianToJD | ewishToJD | D ( MonthName | To ( Gregorian | Julian | French ) | DayOfWeek ) ) | FrenchToJD ) \ \ b ", " name ": " support . function . calendar . php " }, { " match ": " ( ? i ) \ \ b ( c ( lass _ ( exists | alias ) | all _user _method ( _array ) ? ) | trait _exists | i ( s _ ( subclass _of | a ) | nterface _exists ) | _ _autoload | property _exists | get _ ( c ( lass ( _ ( vars | methods ) ) ? | alled _class ) | object _vars | declared _ ( classes | traits | interfaces ) | parent _class ) | method _exists ) \ \ b ", " name ": " support . function . classobj . php " }, { " match ": " ( ? i ) \ \ b ( com _ ( set | create _guid | i ( senum | nvoke ) | pr ( int _typeinfo | op ( set | put | get ) ) | event _sink | load ( _typelib ) ? | addref | release | get ( _active _object ) ? | message _pump ) | variant _ ( s ( ub | et ( _type ) ? ) | n ( ot | eg ) | c ( a ( st | t ) | mp ) | i ( nt | div | mp ) | or | d ( iv | ate _ ( to _timestamp | from _timestamp ) ) | pow | eqv | fix | a ( nd | dd | bs ) | round | get _type | xor | m ( od | ul ) ) ) \ \ b ", " name ": " support . function . com . php " }, { " match ": " ( ? i ) \ \ bctype _ ( space | cntrl | digit | upper | p ( unct | rint ) | lower | al ( num | pha ) | graph | xdigit ) \ \ b ", " name ": " support . function . ctype . php " }, { " match ": " ( ? i ) \ \ bcurl _ ( setopt ( _array ) ? | c ( opy _handle | lose ) | init | e ( rr ( no | or ) | xec ) | version | getinfo | multi _ ( select | close | in ( it | fo _read ) | exec | add _handle | remove _handle | getcontent ) ) \ \ b ", " name ": " support . fun
2024-01-05 12:14:38 +00:00
var hack = [
... html ,
... sql ,
lang
] ;
export { hack as default } ;