From 62556ecf6d3cb33f3d9ab8a6a1c68879d57a4b44 Mon Sep 17 00:00:00 2001 From: Tim Warren Date: Mon, 20 Apr 2015 16:35:51 -0400 Subject: [PATCH] More language support --- config/languages.json | 78 +++++++++++++++++++++++++++++++++++++--- src/TyroApp.cpp | 3 +- src/definitions.h | 8 ++++- src/widgets/EditPane.cpp | 4 ++- 4 files changed, 85 insertions(+), 8 deletions(-) diff --git a/config/languages.json b/config/languages.json index 9743f9a..fa075e2 100644 --- a/config/languages.json +++ b/config/languages.json @@ -21,6 +21,22 @@ "" ] }, + "cobol": { + "file_pattern": "*.cbl;*.cbd;*.cdb;*.cdc;*.cob", + "keywords": [ + "configuration data declaratives division environment environment-division file file-control function i-o i-o-control identification input input-output linkage local-storage output procedure program program-id section special-names working-storage", + "accept add alter apply assign call chain close compute continue control convert count delete display divide draw drop eject else enable end-accept end-add end-call end-chain end-compute end-delete end-display end-divide end-evaluate end-if end-invoke end-multiply end-perform end-read end-receive end-return end-rewrite end-search end-start end-string end-subtract end-unstring end-write erase evaluate examine exec execute exit go goback generate if ignore initialize initiate insert inspect invoke leave merge move multiply open otherwise perform print read receive release reload replace report reread rerun reserve reset return rewind rewrite rollback run search seek select send set sort start stop store string subtract sum suppress terminate then transform unlock unstring update use wait when wrap write", + "access acquire actual address advancing after all allowing alphabet alphabetic alphabetic-lower alphabetic-upper alphanumeric alphanumeric-edited also alternate and any are area areas as ascending at attribute author auto auto-hyphen-skip auto-skip automatic autoterminate background-color background-colour backward basis beep before beginning bell binary blank blink blinking block bold bottom box boxed by c01 c02 c03 c04 c05 c06 c07 c08 c09 c10 c11 c12 cancel cbl cd centered cf ch chaining changed character characters chart class clock-units cobol code code-set col collating color colour column com-reg comma command-line commit commitment common communication comp comp-0 comp-1 comp-2 comp-3 comp-4 comp-5 comp-6 comp-x compression computational computational-1 computational-2 computational-3 computational-4 computational-5 computational-6 computational-x computational console contains content control-area controls conversion converting core-index corr corresponding crt crt-under csp currency current-date cursor cycle cyl-index cyl-overflow date date-compiled date-written day day-of-week dbcs de debug debug-contents debug-item debug-line debug-name debug-sub-1 debug-sub-2 debug-sub-3 debugging decimal-point default delimited delimiter depending descending destination detail disable disk disp display-1 display-st down duplicates dynamic echo egcs egi emi empty-check encryption end end-of-page ending enter entry eol eop eos equal equals error escape esi every exceeds exception excess-3 exclusive exhibit extend extended-search external externally-described-key factory false fd fh--fcd fh--keydef file-id file-limit file-limits file-prefix filler final first fixed footing for foreground-color foreground-colour footing format from full giving global greater grid group heading high high-value high-values highlight id in index indexed indic indicate indicator indicators inheriting initial installation into invalid invoked is japanese just justified kanji kept key keyboard label last leading left left-justify leftline length length-check less limit limits lin linage linage-counter line line-counter lines lock lock-holding locking low low-value low-values lower lowlight manual mass-update master-index memory message method mode modified modules more-labels multiple name named national national-edited native nchar negative next no no-echo nominal not note nstd-reels null nulls number numeric numeric-edited numeric-fill o-fill object object-computer object-storage occurs of off omitted on oostackptr optional or order organization other others overflow overline packed-decimal padding page page-counter packed-decimal paragraph password pf ph pic picture plus pointer pop-up pos position positioning positive previous print-control print-switch printer printer-1 printing prior private procedure-pointer procedures proceed process processing prompt protected public purge queue quote quotes random range rd readers ready record record-overflow recording records redefines reel reference references relative remainder remarks removal renames reorg-criteria repeated replacing reporting reports required resident return-code returning reverse reverse-video reversed rf rh right right-justify rolling rounded s01 s02 s03 s04 s05 same screen scroll sd secure security segment segment-limit selective self selfclass sentence separate sequence sequential service setshadow shift-in shift-out sign size skip1 skip2 skip3 sort-control sort-core-size sort-file-size sort-merge sort-message sort-mode-size sort-option sort-return source source-computer space spaces space-fill spaces standard standard-1 standard-2 starting status sub-queue-1 sub-queue-2 sub-queue-3 subfile super symbolic sync synchronized sysin sysipt syslst sysout syspch syspunch system-info tab tallying tape terminal terminal-info test text than through thru time time-of-day time-out timeout times title to top totaled totaling trace track-area track-limit tracks trailing trailing-sign transaction true type typedef underline underlined unequal unit until up updaters upon upper upsi-0 upsi-1 upsi-2 upsi-3 upsi-4 upsi-5 upsi-6 upsi-7 usage user using value values variable varying when-compiled window with words write-only write-verify writerszero zero zero-fill zeros zeroes" + ] + }, + "coffeescript": { + "file_pattern": "*.coffee;*.litcoffee", + "keywords": [ + "new instanceof do return break continue throw for while until loop if else unless switch when then in of by typeof delete where try catch finally prototype jQuery case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf", + "Object Number Boolean Array String RegExp Function Date Math eval setInterval clearInterval setTimeout clearTimeout isFinite isNaN parseFloat parseInt escape unescape console encodeURI encodeURIComponent decodeURI decodeURIComponent window document navigator location history screen alert prompt process GLOBAL require exports", + "false true yes no on off undefined null NaN Infinity" + ] + }, "cpp": { "file_pattern": "*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hpp;*.hxx;*.xpm", "keywords": [ @@ -35,6 +51,33 @@ "active after before check checked disabled empty enabled first first-child first-letter first-line first-of-type focus hover indeterminate invalid lang last-child last-of-type left link not nth-child nth-last-child nth-of-type nth-last-of-type only-child only-of-type optional read-only read-write required right root selection target valid visited" ] }, + "fortran": { + "file_pattern": "*.f;*.for;*.f90;*.f95;*.f2k", + "keywords": [ + "access action advance allocatable allocate apostrophe assign assignment associate asynchronous backspace bind blank blockdata call case character class close common complex contains continue cycle data deallocate decimal delim default dimension direct do dowhile double doubleprecision else elseif elsewhere encoding end endassociate endblockdata enddo endfile endforall endfunction endif endinterface endmodule endprogram endselect endsubroutine endtype endwhere entry eor equivalence err errmsg exist exit external file flush fmt forall form format formatted function go goto id if implicit in include inout integer inquire intent interface intrinsic iomsg iolength iostat kind len logical module name named namelist nextrec nml none nullify number only open opened operator optional out pad parameter pass pause pending pointer pos position precision print private program protected public quote read readwrite real rec recl recursive result return rewind save select selectcase selecttype sequential sign size stat status stop stream subroutine target then to type unformatted unit use value volatile wait where while write", + "abs achar acos acosd adjustl adjustr aimag aimax0 aimin0 aint ajmax0 ajmin0 akmax0 akmin0 all allocated alog alog10 amax0 amax1 amin0 amin1 amod anint any asin asind associated atan atan2 atan2d atand bitest bitl bitlr bitrl bjtest bit_size bktest break btest cabs ccos cdabs cdcos cdexp cdlog cdsin cdsqrt ceiling cexp char clog cmplx conjg cos cosd cosh count cpu_time cshift csin csqrt dabs dacos dacosd dasin dasind datan datan2 datan2d datand date date_and_time dble dcmplx dconjg dcos dcosd dcosh dcotan ddim dexp dfloat dflotk dfloti dflotj digits dim dimag dint dlog dlog10 dmax1 dmin1 dmod dnint dot_product dprod dreal dsign dsin dsind dsinh dsqrt dtan dtand dtanh eoshift epsilon errsns exp exponent float floati floatj floatk floor fraction free huge iabs iachar iand ibclr ibits ibset ichar idate idim idint idnint ieor ifix iiabs iiand iibclr iibits iibset iidim iidint iidnnt iieor iifix iint iior iiqint iiqnnt iishft iishftc iisign ilen imax0 imax1 imin0 imin1 imod index inint inot int int1 int2 int4 int8 iqint iqnint ior ishft ishftc isign isnan izext jiand jibclr jibits jibset jidim jidint jidnnt jieor jifix jint jior jiqint jiqnnt jishft jishftc jisign jmax0 jmax1 jmin0 jmin1 jmod jnint jnot jzext kiabs kiand kibclr kibits kibset kidim kidint kidnnt kieor kifix kind kint kior kishft kishftc kisign kmax0 kmax1 kmin0 kmin1 kmod knint knot kzext lbound leadz len len_trim lenlge lge lgt lle llt log log10 logical lshift malloc matmul max max0 max1 maxexponent maxloc maxval merge min min0 min1 minexponent minloc minval mod modulo mvbits nearest nint not nworkers number_of_processors pack popcnt poppar precision present product radix random random_number random_seed range real repeat reshape rrspacing rshift scale scan secnds selected_int_kind selected_real_kind set_exponent shape sign sin sind sinh size sizeof sngl snglq spacing spread sqrt sum system_clock tan tand tanh tiny transfer transpose trim ubound unpack verify", + "cdabs cdcos cdexp cdlog cdsin cdsqrt cotan cotand dcmplx dconjg dcotan dcotand decode dimag dll_export dll_import doublecomplex dreal dvchk encode find flen flush getarg getcharqq getcl getdat getenv gettim hfix ibchng identifier imag int1 int2 int4 intc intrup invalop iostat_msg isha ishc ishl jfix lacfar locking locnear map nargs nbreak ndperr ndpexc offset ovefl peekcharqq precfill prompt qabs qacos qacosd qasin qasind qatan qatand qatan2 qcmplx qconjg qcos qcosd qcosh qdim qexp qext qextd qfloat qimag qlog qlog10 qmax1 qmin1 qmod qreal qsign qsin qsind qsinh qsqrt qtan qtand qtanh ran rand randu rewrite segment setdat settim system timer undfl unlock union val virtual volatile zabs zcos zexp zlog zsin zsqrt" + ] + }, + "haskell": { + "file_pattern": "*.hs;*.lhs;*.las", + "keywords": [ + "as case class data default deriving do else hiding if import in infix infixl infixr instance let module newtype of proc qualified rec then type where _" + ] + }, + "html": { + "file_pattern": "*.html;*.htm;*.shtml;*.shtm;*.xhtml", + "keywords": [ + "!doctype a abbr accept accept-charset accesskey acronym action address align alink alt applet archive area article aside audio axis b background base basefont bdo bgcolor big blockquote body border br button canvas caption cellpadding cellspacing center char charoff charset checkbox checked cite class classid clear code codebase codetype col colgroup color cols colspan command compact content contenteditable contextmenu coords data datafld dataformatas datalist datapagesize datasrc datetime dd declare defer del details dfn dir disabled div dl draggable dropzone dt em embed enctype event face fieldset figcaption figure file font footer for form frame frameborder frameset h1 h2 h3 h4 h5 h6 head header height hgroup hidden hr href hreflang hspace html http-equiv i id iframe image img input ins isindex ismap kbd keygen label lang language leftmargin legend li link longdesc main map marginheight marginwidth mark marquee maxlength media menu meta meter method multiple name nav noframes nohref noresize noscript noshade nowrap object ol onabort onafterprint onbeforeonload onbeforeprint onblur oncanplay oncanplaythrough onchange onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange ondurationchange onemptied onended onerror onfocus onformchange onforminput onhaschange oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart onmessage onmousedown onmousemove onmouseout onmouseover onmouseup onmousewheel onoffline ononline onpagehide onpageshow onpause onplay onplaying onpopstate onprogress onratechange onreadystatechange onredo onreset onresize onscroll onseeked onseeking onselect onselect onstalled onstorage onsubmit onsubmit onsuspend ontimeupdate onundo onunload onunload onvolumechange onwaiting optgroup option output p param password placeholder pre profile progress prompt public q radio readonly rel reset rev rows rowspan rp rt ruby rules s samp scheme scope script section select selected shape size small source span spellcheck src standby start strike strong style sub submit summary sup tabindex table target tbody td text textarea tfoot th thead time title topmargin tr tt type u ul usemap valign value valuetype var version video vlink vspace wbr width xml xmlns" + ] + }, + "java": { + "file_pattern": "*.java", + "keywords": [ + "instanceof assert if else switch case default break goto return for while do continue new throw throws try catch finally this super extends implements import true false null", + "package transient strictfp void char short int long double float const static volatile byte boolean class interface native private protected public final abstract synchronized enum" + ] + }, "js": { "file_pattern": "*.js;*.json;*.ts", "keywords": [ @@ -42,10 +85,19 @@ "console window document" ] }, - "html": { - "file_patter": "*.html;*.htm;*.shtml;*.shtm;*.xhtml", + "lisp": { + "file_pattern": "*.lsp;*.lisp", "keywords": [ - "!doctype a abbr accept accept-charset accesskey acronym action address align alink alt applet archive area article aside audio axis b background base basefont bdo bgcolor big blockquote body border br button canvas caption cellpadding cellspacing center char charoff charset checkbox checked cite class classid clear code codebase codetype col colgroup color cols colspan command compact content contenteditable contextmenu coords data datafld dataformatas datalist datapagesize datasrc datetime dd declare defer del details dfn dir disabled div dl draggable dropzone dt em embed enctype event face fieldset figcaption figure file font footer for form frame frameborder frameset h1 h2 h3 h4 h5 h6 head header height hgroup hidden hr href hreflang hspace html http-equiv i id iframe image img input ins isindex ismap kbd keygen label lang language leftmargin legend li link longdesc main map marginheight marginwidth mark marquee maxlength media menu meta meter method multiple name nav noframes nohref noresize noscript noshade nowrap object ol onabort onafterprint onbeforeonload onbeforeprint onblur oncanplay oncanplaythrough onchange onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange ondurationchange onemptied onended onerror onfocus onformchange onforminput onhaschange oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart onmessage onmousedown onmousemove onmouseout onmouseover onmouseup onmousewheel onoffline ononline onpagehide onpageshow onpause onplay onplaying onpopstate onprogress onratechange onreadystatechange onredo onreset onresize onscroll onseeked onseeking onselect onselect onstalled onstorage onsubmit onsubmit onsuspend ontimeupdate onundo onunload onunload onvolumechange onwaiting optgroup option output p param password placeholder pre profile progress prompt public q radio readonly rel reset rev rows rowspan rp rt ruby rules s samp scheme scope script section select selected shape size small source span spellcheck src standby start strike strong style sub submit summary sup tabindex table target tbody td text textarea tfoot th thead time title topmargin tr tt type u ul usemap valign value valuetype var version video vlink vspace wbr width xml xmlns" + "not defun + - * / = < > <= >= princ eval apply funcall quote identity function complement backquote lambda set setq setf defun defmacro gensym make symbol intern symbol name symbol value symbol plist get getf putprop remprop hash make array aref car cdr caar cadr cdar cddr caaar caadr cadar caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr cons list append reverse last nth nthcdr member assoc subst sublis nsubst nsublis remove length list length mapc mapcar mapl maplist mapcan mapcon rplaca rplacd nconc delete atom symbolp numberp boundp null listp consp minusp zerop plusp evenp oddp eq eql equal cond case and or let l if prog prog1 prog2 progn go return do dolist dotimes catch throw error cerror break continue errset baktrace evalhook truncate float rem min max abs sin cos tan expt exp sqrt random logand logior logxor lognot bignums logeqv lognand lognor logorc2 logtest logbitp logcount integer length nil" + ] + }, + "lua": { + "file_pattern": "*.lua", + "keywords": [ + "and break do else elseif end false for function goto if in local nil not or repeat return then true until while", + "_ENV _G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawlen rawset require select setfenv setmetatable tonumber tostring type unpack xpcall string table math bit32 coroutine io os debug package __index __newindex __call __add __sub __mul __div __mod __pow __unm __concat __len __eq __lt __le __gc __mode", + "byte char dump find format gmatch gsub len lower match rep reverse sub upper abs acos asin atan atan2 ceil cos cosh deg exp floor fmod frexp ldexp log log10 max min modf pow rad random randomseed sin sinh sqrt tan tanh arshift band bnot bor btest bxor extract lrotate lshift replace rrotate rshift shift string.byte string.char string.dump string.find string.format string.gmatch string.gsub string.len string.lower string.match string.rep string.reverse string.sub string.upper table.concat table.insert table.maxn table.pack table.remove table.sort table.unpack math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.cosh math.deg math.exp math.floor math.fmod math.frexp math.huge math.ldexp math.log math.log10 math.max math.min math.modf math.pi math.pow math.rad math.random math.randomseed math.sin math.sinh math.sqrt math.tan math.tanh bit32.arshift bit32.band bit32.bnot bit32.bor bit32.btest bit32.bxor bit32.extract bit32.lrotate bit32.lshift bit32.replace bit32.rrotate bit32.rshift", + "close flush lines read seek setvbuf write clock date difftime execute exit getenv remove rename setlocale time tmpname coroutine.create coroutine.resume coroutine.running coroutine.status coroutine.wrap coroutine.yield io.close io.flush io.input io.lines io.open io.output io.popen io.read io.tmpfile io.type io.write io.stderr io.stdin io.stdout os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename os.setlocale os.time os.tmpname debug.debug debug.getfenv debug.gethook debug.getinfo debug.getlocal debug.getmetatable debug.getregistry debug.getupvalue debug.getuservalue debug.setfenv debug.sethook debug.setlocal debug.setmetatable debug.setupvalue debug.setuservalue debug.traceback debug.upvalueid debug.upvaluejoin package.cpath package.loaded package.loaders package.loadlib package.path package.preload package.seeall" ] }, "makefile": { @@ -55,7 +107,7 @@ ] }, "php": { - "file_pattern": "*.php", + "file_pattern": "*.php;*.phtml", "keywords": [ "filesize filemtime ksort sort count shell_exec disk_free_space disk_total_space file_exists strip_tags htmlentities stripslashes mysql_real_escape_string session_start error_reporting define str_replace pathinfo date time version_compare sha1 sha1_file md5 md5_file ignore_user_abort and or xor __dir__ __method__ __namespace__ __file__ __line__ array as break case cfunction class const continue declare default die do echo else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval exit extends for foreach function global if include include_once isset list new old_function print require require_once return static switch unset use var while __function__ __class__ php_version php_os default_include_path pear_install_dir pear_extension_dir php_extension_dir php_bindir php_libdir php_datadir php_sysconfdir php_localstatedir php_config_file_path php_output_handler_start php_output_handler_cont php_output_handler_end e_error e_recoverable_error e_warning e_parse e_notice e_core_error e_core_warning e_compile_error e_compile_warning e_user_error e_user_warning e_user_notice e_all true false bool boolean int integer float double real string array object resource null class extends parent stdclass directory __sleep __wakeup interface implements abstract public protected private printf print_r php_major_version php_minor_version php_release_version php_version_id php_extra_version php_zts php_debug php_maxpathlen php_sapi php_eol php_int_max php_int_size php_prefix php_mandir php_config_file_scan_dir php_shlib_suffix php_windows_version_major php_windows_version_minor php_windows_version_build php_windows_version_platform php_windows_version_sp_major php_windows_version_sp_minor php_windows_version_suitemask php_windows_version_producttype php_windows_nt_domain_controller php_windows_nt_server php_windows_nt_workstation e_deprecated e_user_deprecated e_strict __compiler_halt_offset__ extr_overwrite extr_skip extr_prefix_same extr_prefix_all extr_prefix_invalid extr_prefix_if_exists extr_if_exists sort_asc sort_desc sort_regular sort_numeric sort_string case_lower case_upper count_normal count_recursive assert_active assert_callback assert_bail assert_warning assert_quiet_eval connection_aborted connection_normal connection_timeout ini_user ini_perdir ini_system ini_all m_e m_log2e m_log10e m_ln2 m_ln10 m_pi m_pi_2 m_pi_4 m_1_pi m_2_pi m_2_sqrtpi m_sqrt2 m_sqrt1_2 crypt_salt_length crypt_std_des crypt_ext_des crypt_md5 crypt_blowfish directory_separator seek_set seek_cur seek_end lock_sh lock_ex lock_un lock_nb html_specialchars html_entities ent_compat ent_quotes ent_noquotes info_general info_credits info_configuration info_modules info_environment info_variables info_license info_all credits_group credits_general credits_sapi credits_modules credits_docs credits_fullpage credits_qa credits_all str_pad_left str_pad_right str_pad_both pathinfo_dirname pathinfo_basename pathinfo_extension path_separator char_max lc_ctype lc_numeric lc_time lc_collate lc_monetary lc_all lc_messages abday_1 abday_2 abday_3 abday_4 abday_5 abday_6 abday_7 day_1 day_2 day_3 day_4 day_5 day_6 day_7 abmon_1 abmon_2 abmon_3 abmon_4 abmon_5 abmon_6 abmon_7 abmon_8 abmon_9 abmon_10 abmon_11 abmon_12 mon_1 mon_2 mon_3 mon_4 mon_5 mon_6 mon_7 mon_8 mon_9 mon_10 mon_11 mon_12 am_str pm_str d_t_fmt d_fmt t_fmt t_fmt_ampm era era_year era_d_t_fmt era_d_fmt era_t_fmt alt_digits int_curr_symbol currency_symbol crncystr mon_decimal_point mon_thousands_sep mon_grouping positive_sign negative_sign int_frac_digits frac_digits p_cs_precedes p_sep_by_space n_cs_precedes n_sep_by_space p_sign_posn n_sign_posn decimal_point radixchar thousands_sep thousep grouping yesexpr noexpr yesstr nostr codeset log_emerg log_alert log_crit log_err log_warning log_notice log_info log_debug log_kern log_user log_mail log_daemon log_auth log_syslog log_lpr log_news log_uucp log_cron log_authpriv log_local0 log_local1 log_local2 log_local3 log_local4 log_local5 log_local6 log_local7 log_pid log_cons log_odelay log_ndelay log_nowait log_perror msql_connect msql_close msql msql_create_db msql_createdb msql_drop_db msql_drop_db msql_select_db msql_select_db msql_pconnect msql msql_create_db msql_createdb msql_drop_db msql_drop_db msql_select_db msql_select_db msql_db_query msql_list_dbs msql_list_fields msql_list_tables msql_query msql msql_affected_rows msql_data_seek msql_dbname msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_field_table msql_field_flags msql_field_len msql_field_name msql_field_type msql_num_fields msql_num_rows msql_numfields msql_numrows msql_result mssql_connect mssql_query mssql_select_db mssql_close mssql_pconnect mssql_query mssql_select_db mssql_query mssql_data_seek mssql_fetch_array mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_num_fields mssql_num_rows mssql_result mssql_free_result mysql_connect mysql_affected_rows mysql_change_user mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_tables mysql_query mysql_result mysql_select_db mysql_tablename mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_close mysql_pconnect mysql_affected_rows mysql_change_user mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_tables mysql_query mysql_result mysql_select_db mysql_tablename mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_db_query mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_query mysql_unbuffered_query mysql_data_seek mysql_db_name mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_fetch_row mysql_field_flags mysql_field_name mysql_field_len mysql_field_seek mysql_field_table mysql_field_type mysql_num_fields mysql_num_rows mysql_result mysql_tablename mysql_free_result ocilogon ociplogon ocinlogon ocicommit ociserverversion ocinewcursor ociparse ocierror ocilogoff ocinewdescriptor ocirollback ocinewdescriptor ocirowcount ocidefinebyname ocibindbyname ociexecute ocinumcols ociresult ocifetch ocifetchinto ocifetchstatement ocicolumnisnull ocicolumnname ocicolumnsize ocicolumntype ocistatementtype ocierror ocifreestatement odbc_connect odbc_autocommit odbc_commit odbc_error odbc_errormsg odbc_exec odbc_tables odbc_tableprivileges odbc_do odbc_prepare odbc_columns odbc_columnprivileges odbc_procedurecolumns odbc_specialcolumns odbc_rollback odbc_setoption odbc_gettypeinfo odbc_primarykeys odbc_foreignkeys odbc_procedures odbc_statistics odbc_close odbc_pconnect odbc_autocommit odbc_commit odbc_error odbc_errormsg odbc_exec odbc_tables odbc_tableprivileges odbc_do odbc_prepare odbc_columns odbc_columnprivileges odbc_procedurecolumns odbc_specialcolumns odbc_rollback odbc_setoption odbc_gettypeinfo odbc_primarykeys odbc_foreignkeys odbc_procedures odbc_statistics odbc_prepare odbc_binmode odbc_cursor odbc_execute odbc_fetch_into odbc_fetch_row odbc_field_name odbc_field_num odbc_field_type odbc_field_len odbc_field_precision odbc_field_scale odbc_longreadlen odbc_num_fields odbc_num_rows odbc_result odbc_result_all odbc_setoption odbc_free_result openssl_get_privatekey openssl_get_publickey openssl_sign openssl_seal openssl_open openssl_verify openssl_free_key xml_parser_create xml_parser_create_ns xml_set_object xml_set_element_handler xml_set_character_data_handler xml_set_processing_instruction_handler xml_set_default_handler xml_set_unparsed_entity_decl_handler xml_set_notation_decl_handler xml_set_external_entity_ref_handler xml_parse xml_get_error_code xml_error_string xml_get_current_line_number xml_get_current_column_number xml_get_current_byte_index xml_parse_into_struct xml_parser_set_option xml_parser_get_option xml_parser_free gzopen gzeof gzgetc gzgets gzgetss gzpassthru gzputs gzread gzrewind gzseek gztell gzwrite gzclose bzopen bzerrno bzerror bzerrstr bzflush bzread bzwrite bzclose com_load com_invoke com_propget com_get com_propput com_set com_propput imagecreate imagecreatefromgd imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromwbmp imagecreatefromstring imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagerotate imagearc imagechar imagecharup imagecolorallocate imagecolorat imagecolorclosest imagecolorexact imagecolorresolve imagegammacorrect imagegammacorrect imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopyresized imagedashedline imagefill imagefilledpolygon imagefilledrectangle imagefilltoborder imagegif imagepng imagejpeg imagewbmp imageinterlace imageline imagepolygon imagepstext imagerectangle imagerotate imagesetpixel imagestring imagestringup imagesx imagesy imagettftext imagefilledarc imageellipse imagefilledellipse imagecolorclosestalpha imagecolorexactalpha imagecolorresolvealpha imagecopymerge imagecopymergegray imagecopyresampled imagetruecolortopalette imagesetbrush imagesettile imagesetthickness image2wbmp imagealphablending imageantialias imagecolorallocatealpha imagecolorclosesthwb imagecolordeallocate imagecolormatch imagefilter imagefttext imagegd imagegd2 imageistruecolor imagelayereffect imagepalettecopy imagesavealpha imagesetstyle imagexbm imagedestroy imageloadfont imagechar imagecharup imagefontheight imagepsloadfont imagepstext imagepsslantfont imagepsextendfont imagepsencodefont imagepsbbox imagepsfreefont curl_copy_handle curl_init curl_copy_handle curl_errno curl_error curl_exec curl_getinfo curl_setopt curl_close dba_open dba_delete dba_exists dba_fetch dba_firstkey dba_insert dba_nextkey dba_optimize dba_replace dba_sync dba_close dba_popen dba_delete dba_exists dba_fetch dba_firstkey dba_insert dba_nextkey dba_optimize dba_replace dba_sync strstr strtoupper strtolower strpos explode implode closedir getdir floatval rtrim fwrite extension_loaded final catch clone goto instanceof namespace throw try trigger_error ftp_connect ftp_ssl_connect ftp_close ftp_login ftp_pwd ftp_cdup ftp_chdir ftp_mkdir ftp_rmdir ftp_nlist ftp_rawlist ftp_systype ftp_pasv ftp_get ftp_fget ftp_put ftp_fput ftp_size ftp_mdtm ftp_rename ftp_delete ftp_site ftp_alloc ftp_chmod ftp_exec ftp_get_option ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_raw ftp_set_option imap_open imap_close imap_append imap_body imap_check imap_createmailbox imap_delete imap_deletemailbox imap_expunge imap_fetchbody imap_fetchstructure imap_headerinfo imap_header imap_headers imap_listmailbox imap_getmailboxes imap_get_quota imap_status imap_listsubscribed imap_set_quota imap_set_quota imap_getsubscribed imap_mail_copy imap_mail_move imap_num_msg imap_num_recent imap_ping imap_renamemailbox imap_reopen imap_subscribe imap_undelete imap_unsubscribe imap_scanmailbox imap_mailboxmsginfo imap_fetchheader imap_uid imap_msgno imap_search imap_fetch_overview array_change_key_case array_chunk array_combine array_count_values array_diff array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill array_fill_keys array_filter array_flip array_intersect array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map array_merge array_merge_recursive array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_replace array_replace_recursive array_reverse array_search array_shift array_slice array_splice array_sum array_udiff array_udiff_assoc array_udiff_uassoc array_uintersect array_uintersect_assoc array_uintersect_uassoc array_unique array_unshift array_values array_walk array_walk_recursive arrayaccess arrayiterator arrayobject fclose flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf fseek fsockopen fstat ftell __construct __destruct" ] @@ -72,10 +124,28 @@ "and as assert break class continue def del elif else except exec False finally for from global if import in is lambda None not or pass print raise return triple True try while with yield" ] }, + "ruby": { + "file_pattern": "*.rb;*.rbw", + "keywords": [ + "ARGF ARGV BEGIN END ENV FALSE DATA NIL RUBY_PATCHLEVEL RUBY_PLATFORM RUBY_RELEASE_DATE RUBY_VERSION PLATFORM RELEASE_DATE STDERR STDIN STDOUT TOPLEVEL_BINDING TRUE __ENCODING__ __END__ __FILE__ __LINE__ alias and begin break case class def defined? do else elsif end ensure false for if in module next nil not or redo rescue retry return self super then true undef unless until when while yield" + ] + }, "shell": { "file_pattern": "*.sh;*.bsh;*.run", "keywords": [ "alias ar asa awk banner basename bash bc bdiff break bunzip2 bzip2 cal calendar case cat cc cd chmod cksum clear cmp col comm compress continue cp cpio crypt csplit ctags cut date dc dd declare deroff dev df diff diff3 dircmp dirname do done du echo ed egrep elif else env esac eval ex exec exit expand export expr false fc fgrep fi file find fmt fold for function functions getconf getopt getopts grep gres hash head help history iconv id if in integer jobs join kill local lc let line ln logname look ls m4 mail mailx make man mkdir more mt mv newgrp nl nm nohup ntps od pack paste patch pathchk pax pcat perl pg pr print printf ps pwd read readonly red return rev rm rmdir sed select set sh shift size sleep sort spell split start stop strings strip stty sum suspend sync tail tar tee test then time times touch tr trap true tsort tty type typeset ulimit umask unalias uname uncompress unexpand uniq unpack unset until uudecode uuencode vi vim vpax wait wc whence which while who wpaste wstart xargs zcat" ] + }, + "sql": { + "file_pattern": "*.sql", + "keywords": [ + "abs absolute access acos add add_months adddate admin after aggregate all allocate alter and any app_name are array as asc ascii asin assertion at atan atn2 audit authid authorization autonomous_transaction avg before begin benchmark between bfilename bigint bin binary binary_checksum binary_integer bit bit_count bit_and bit_or blob body boolean both breadth bulk by call cascade cascaded case cast catalog ceil ceiling char char_base character charindex chartorowid check checksum checksum_agg chr class clob close cluster coalesce col_length col_name collate collation collect column comment commit completion compress concat concat_ws connect connection constant constraint constraints constructorcreate contains containsable continue conv convert corr corresponding cos cot count count_big covar_pop covar_samp create cross cube cume_dist current current_date current_path current_role current_time current_timestamp current_user currval cursor cycle data datalength databasepropertyex date date_add date_format date_sub dateadd datediff datename datepart datetime day db_id db_name deallocate dec declare decimal decode default deferrable deferred degrees delete dense_rank depth deref desc describe descriptor destroy destructor deterministic diagnostics dictionary disconnect difference distinct do domain double drop dump dynamic each else elsif empth encode encrypt end end-exec equals escape every except exception exclusive exec execute exists exit exp export_set extends external extract false fetch first first_value file float floor file_id file_name filegroup_id filegroup_name filegroupproperty fileproperty for forall foreign format formatmessage found freetexttable from from_days fulltextcatalog fulltextservice function general get get_lock getdate getansinull getutcdate global go goto grant greatest group grouping having heap hex hextoraw host host_id host_name hour ident_incr ident_seed ident_current identified identity if ifnull ignore immediate in increment index index_col indexproperty indicator initcap initial initialize initially inner inout input insert instr instrb int integer interface intersect interval into is is_member is_srvrolemember is_null is_numeric isdate isnull isolation iterate java join key lag language large last last_day last_value lateral lcase lead leading least left len length lengthb less level like limit limited ln lpad local localtime localtimestamp locator lock log log10 long loop lower ltrim make_ref map match max maxextents mid min minus minute mlslabel mod mode modifies modify module month months_between names national natural naturaln nchar nclob new new_time newid next next_day nextval no noaudit nocompress nocopy none not nowait null nullif number number_base numeric nvl nvl2 object object_id object_name object_property ocirowid oct of off offline old on online only opaque open operator operation option or ord order ordinalityorganization others out outer output package pad parameter parameters partial partition path pctfree percent_rank pi pls_integer positive positiven postfix pow power pragma precision prefix preorder prepare preserve primary prior private privileges procedure public radians raise rand range rank ratio_to_export raw rawtohex read reads real record recursive ref references referencing reftohex relative release release_lock rename repeat replace resource restrict result return returns reverse revoke right rollback rollup round routine row row_number rowid rowidtochar rowlabel rownum rows rowtype rpad rtrim savepoint schema scroll scope search second section seddev_samp select separate sequence session session_user set sets share sign sin sinh size smallint some soundex space specific specifictype sql sqlcode sqlerrm sqlexception sqlstate sqlwarning sqrt start state statement static std stddev stdev_pop strcmp structure subdate substr substrb substring substring_index subtype successful sum synonym sys_context sys_guid sysdate system_user table tan tanh temporary terminate than then time timestamp timezone_abbr timezone_minute timezone_hour timezone_region tinyint to to_char to_date to_days to_number to_single_byte trailing transaction translate translation treat trigger trim true trunc truncate type ucase uid under union unique unknown unnest update upper usage use user userenv using validate value values var_pop var_samp varbinary varchar varchar2 variable variance varying view vsize when whenever where with without while with work write year zone" + ] + }, + "xml": { + "file_pattern": "*.xml;*.xsml;*.xsl;*.xsd;*.kml;*.wsdl;*.xlf;*.xliff", + "keywords": [ + "" + ] } } diff --git a/src/TyroApp.cpp b/src/TyroApp.cpp index 881ecb1..bf64ae9 100644 --- a/src/TyroApp.cpp +++ b/src/TyroApp.cpp @@ -31,6 +31,5 @@ bool TyroApp::OnInit() int TyroApp::OnExit() { - close(true); - return 1; + return close(true); } diff --git a/src/definitions.h b/src/definitions.h index 6a6d6f7..27e24bb 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -5,6 +5,13 @@ #ifndef DEFINITIONS_H #define DEFINITIONS_H +enum { + myFILE_MENU, + myEDIT_MENU, + myVIEW_MENU, + myHELP_MENU +}; + // Application config const wxString APP_NAME = "Tyro"; const wxString APP_VENDOR = "Aviat Ion"; @@ -17,7 +24,6 @@ const wxString TYRO_OPEN_ERROR = "Failed to open the file. Check that it exists, const wxString TYRO_OPEN_ERROR_CAPTION = "Open Failed"; // EditPane file extension to lexer mapping -typedef pair StringConstMapData; typedef map StringConstMap; const wxString TYRO_FILE_OPEN_WILDCARDS = diff --git a/src/widgets/EditPane.cpp b/src/widgets/EditPane.cpp index 0f35a68..bc9f99d 100644 --- a/src/widgets/EditPane.cpp +++ b/src/widgets/EditPane.cpp @@ -10,12 +10,14 @@ EditPane::EditPane( lexerMap["batch"] = wxSTC_LEX_BATCH; lexerMap["caml"] = wxSTC_LEX_CAML; lexerMap["cmake"] = wxSTC_LEX_CMAKE; + lexerMap["cobol"] = wxSTC_LEX_COBOL; + lexerMap["coffeescript"] = wxSTC_LEX_CPP; lexerMap["cpp"] = wxSTC_LEX_CPP; lexerMap["css"] = wxSTC_LEX_CSS; lexerMap["js"] = wxSTC_LEX_CPP; lexerMap["html"] = wxSTC_LEX_HTML; lexerMap["makefile"] = wxSTC_LEX_MAKEFILE; - lexerMap["php"] = wxSTC_LEX_PHPSCRIPT | wxSTC_LEX_HTML; + lexerMap["php"] = wxSTC_LEX_PHPSCRIPT; lexerMap["perl"] = wxSTC_LEX_PERL; lexerMap["python"] = wxSTC_LEX_PYTHON; lexerMap["shell"] = wxSTC_LEX_BASH;