Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file js_token.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315(* Js_of_ocaml compiler
* http://www.ocsigen.org/js_of_ocaml/
* Copyright (C) 2017 Hugo Heuzard
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, with linking exception;
* either version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)open!StdlibmoduleAnnot=structtypet=string*Parse_info.t*Primitive.tendtypet=|T_WITHofParse_info.t|T_WHILEofParse_info.t|T_VOIDofParse_info.t|T_VIRTUAL_SEMICOLONofParse_info.t|T_VARofParse_info.t|T_TYPEOFofParse_info.t|T_TRYofParse_info.t|T_TRUEofParse_info.t|T_THROWofParse_info.t|T_THISofParse_info.t|T_SWITCHofParse_info.t|T_STRINGof(string*Parse_info.t*int)|T_STRICT_NOT_EQUALofParse_info.t|T_STRICT_EQUALofParse_info.t|T_SEMICOLONofParse_info.t|T_RSHIFT_ASSIGNofParse_info.t|T_RSHIFT3_ASSIGNofParse_info.t|T_RSHIFT3ofParse_info.t|T_RSHIFTofParse_info.t|T_RPARENofParse_info.t|T_RETURNofParse_info.t|T_REGEXof(string*Parse_info.t)|T_RCURLYofParse_info.t|T_RBRACKETofParse_info.t|T_PLUS_ASSIGNofParse_info.t|T_PLUSofParse_info.t|T_PLINGofParse_info.t|T_PERIODofParse_info.t|T_ORofParse_info.t|T_NUMBERof(string*Parse_info.t)|T_NULLofParse_info.t|T_NOT_EQUALofParse_info.t|T_NOTofParse_info.t|T_SPREADofParse_info.t|T_NEWofParse_info.t|T_MULT_ASSIGNofParse_info.t|T_MULTofParse_info.t|T_MOD_ASSIGNofParse_info.t|T_MODofParse_info.t|T_MINUS_ASSIGNofParse_info.t|T_MINUSofParse_info.t|T_LSHIFT_ASSIGNofParse_info.t|T_LSHIFTofParse_info.t|T_LPARENofParse_info.t|T_LESS_THAN_EQUALofParse_info.t|T_LESS_THANofParse_info.t|T_LCURLYofParse_info.t|T_LBRACKETofParse_info.t|T_INSTANCEOFofParse_info.t|T_INCR_NBofParse_info.t|T_INCRofParse_info.t|T_INofParse_info.t|T_IFofParse_info.t|T_IDENTIFIERof(string*Parse_info.t)|T_GREATER_THAN_EQUALofParse_info.t|T_GREATER_THANofParse_info.t|T_FUNCTIONofParse_info.t|T_FORofParse_info.t|T_FINALLYofParse_info.t|T_FALSEofParse_info.t|T_EQUALofParse_info.t|T_ELSEofParse_info.t|T_DOofParse_info.t|T_DIV_ASSIGNofParse_info.t|T_DIVofParse_info.t|T_DELETEofParse_info.t|T_DEFAULTofParse_info.t|T_DECR_NBofParse_info.t|T_DECRofParse_info.t|T_CONTINUEofParse_info.t|T_COMMAofParse_info.t|T_COLONofParse_info.t|T_CATCHofParse_info.t|T_CASEofParse_info.t|T_BREAKofParse_info.t|T_BIT_XOR_ASSIGNofParse_info.t|T_BIT_XORofParse_info.t|T_BIT_OR_ASSIGNofParse_info.t|T_BIT_ORofParse_info.t|T_BIT_NOTofParse_info.t|T_BIT_AND_ASSIGNofParse_info.t|T_BIT_ANDofParse_info.t|T_ASSIGNofParse_info.t|T_ANDofParse_info.t|T_DEBUGGERofParse_info.t|TUnknownof(string*Parse_info.t)|TCommentof(string*Parse_info.t)|TCommentLineDirectiveof(string*Parse_info.t)|TAnnotofAnnot.t|EOFofParse_info.ttypetoken=tletinfo=function|TAnnot(_,ii,_)->ii|TUnknown(_,ii)->ii|TComment(_,ii)->ii|TCommentLineDirective(_,ii)->ii|EOFii->ii|T_DEBUGGERii->ii|T_NUMBER(_,ii)->ii|T_IDENTIFIER(_,ii)->ii|T_STRING(_,ii,_)->ii|T_REGEX(_,ii)->ii|T_FUNCTIONii->ii|T_IFii->ii|T_INii->ii|T_INSTANCEOFii->ii|T_RETURNii->ii|T_SWITCHii->ii|T_THISii->ii|T_THROWii->ii|T_TRYii->ii|T_VARii->ii|T_WHILEii->ii|T_WITHii->ii|T_NULLii->ii|T_FALSEii->ii|T_TRUEii->ii|T_BREAKii->ii|T_CASEii->ii|T_CATCHii->ii|T_CONTINUEii->ii|T_DEFAULTii->ii|T_DOii->ii|T_FINALLYii->ii|T_FORii->ii|T_ELSEii->ii|T_NEWii->ii|T_LCURLYii->ii|T_RCURLYii->ii|T_LPARENii->ii|T_RPARENii->ii|T_LBRACKETii->ii|T_RBRACKETii->ii|T_SEMICOLONii->ii|T_COMMAii->ii|T_PERIODii->ii|T_RSHIFT3_ASSIGNii->ii|T_RSHIFT_ASSIGNii->ii|T_LSHIFT_ASSIGNii->ii|T_BIT_XOR_ASSIGNii->ii|T_BIT_OR_ASSIGNii->ii|T_BIT_AND_ASSIGNii->ii|T_MOD_ASSIGNii->ii|T_DIV_ASSIGNii->ii|T_MULT_ASSIGNii->ii|T_MINUS_ASSIGNii->ii|T_PLUS_ASSIGNii->ii|T_ASSIGNii->ii|T_PLINGii->ii|T_COLONii->ii|T_ORii->ii|T_ANDii->ii|T_BIT_ORii->ii|T_BIT_XORii->ii|T_BIT_ANDii->ii|T_EQUALii->ii|T_NOT_EQUALii->ii|T_STRICT_EQUALii->ii|T_STRICT_NOT_EQUALii->ii|T_LESS_THAN_EQUALii->ii|T_GREATER_THAN_EQUALii->ii|T_LESS_THANii->ii|T_GREATER_THANii->ii|T_LSHIFTii->ii|T_RSHIFTii->ii|T_RSHIFT3ii->ii|T_PLUSii->ii|T_MINUSii->ii|T_DIVii->ii|T_MULTii->ii|T_MODii->ii|T_SPREADii->ii|T_NOTii->ii|T_BIT_NOTii->ii|T_INCRii->ii|T_DECRii->ii|T_INCR_NBii->ii|T_DECR_NBii->ii|T_DELETEii->ii|T_TYPEOFii->ii|T_VOIDii->ii|T_VIRTUAL_SEMICOLONii->iiletto_string=function|TAnnot(s,_,_)->s|TUnknown(s,_)->s|TComment(s,_)->s|TCommentLineDirective(s,_)->s|T_NUMBER(s,_)->s|T_IDENTIFIER(s,_)->s|T_STRING(s,_,_)->Printf.sprintf"%S"s|T_REGEX(s,_)->s|EOF_->""|T_DEBUGGER_->"debugger"|T_FUNCTION_->"function"|T_IF_->"if"|T_IN_->"in"|T_INSTANCEOF_->"instanceof"|T_RETURN_->"return"|T_SWITCH_->"switch"|T_THIS_->"this"|T_THROW_->"throw"|T_TRY_->"try"|T_VAR_->"var"|T_WHILE_->"while"|T_WITH_->"with"|T_NULL_->"null"|T_FALSE_->"false"|T_TRUE_->"true"|T_BREAK_->"break"|T_CASE_->"case"|T_CATCH_->"catch"|T_CONTINUE_->"continue"|T_DEFAULT_->"default"|T_DO_->"do"|T_FINALLY_->"finally"|T_FOR_->"for"|T_ELSE_->"else"|T_NEW_->"new"|T_LCURLY_->"{"|T_RCURLY_->"}"|T_LPAREN_->"("|T_RPAREN_->")"|T_LBRACKET_->"["|T_RBRACKET_->"]"|T_SEMICOLON_->";"|T_COMMA_->","|T_PERIOD_->"."|T_RSHIFT3_ASSIGN_->">>>="|T_RSHIFT_ASSIGN_->">>="|T_LSHIFT_ASSIGN_->"<<="|T_BIT_XOR_ASSIGN_->"^="|T_BIT_OR_ASSIGN_->"|="|T_BIT_AND_ASSIGN_->"&="|T_MOD_ASSIGN_->"%="|T_DIV_ASSIGN_->"/="|T_MULT_ASSIGN_->"*="|T_MINUS_ASSIGN_->"-="|T_PLUS_ASSIGN_->"+="|T_ASSIGN_->"="|T_PLING_->"?"|T_COLON_->":"|T_OR_->"||"|T_AND_->"&&"|T_BIT_OR_->"|"|T_BIT_XOR_->"^"|T_BIT_AND_->"&"|T_EQUAL_->"=="|T_NOT_EQUAL_->"!="|T_STRICT_EQUAL_->"==="|T_STRICT_NOT_EQUAL_->"!=="|T_LESS_THAN_EQUAL_->"<="|T_GREATER_THAN_EQUAL_->">="|T_LESS_THAN_->"<"|T_GREATER_THAN_->">"|T_LSHIFT_->"<<"|T_RSHIFT_->">>"|T_RSHIFT3_->">>>"|T_PLUS_->"+"|T_MINUS_->"-"|T_DIV_->"/"|T_MULT_->"*"|T_MOD_->"%"|T_SPREAD_->".."|T_NOT_->"!"|T_BIT_NOT_->"~"|T_INCR_->"++"|T_DECR_->"--"|T_INCR_NB_->"++"|T_DECR_NB_->"--"|T_DELETE_->"delete"|T_TYPEOF_->"typeof"|T_VOID_->"void"|T_VIRTUAL_SEMICOLON_->";"letto_string_extrax=to_stringx^matchxwith|T_IDENTIFIER_->" (identifier)"|T_INCR_NB_->" (INCR_NB)"|T_INCR_->" (INCR)"|T_DECR_NB_->" (DECR_NB)"|T_DECR_->" (DECR)"|T_VIRTUAL_SEMICOLON_->" (virtual)"|TAnnot_->"(annot)"|_->""