| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,16 @@ | |||
| 1 | + 0.3: (In progress) | ||
| 2 | + * Ensure highlight is compiled as a universal binary | ||
| 3 | + * Added .command as an alternate extension for shell scripts | ||
| 4 | + * Added .mll and .mly extensions for OCaml | ||
| 5 | + * Include customized .css and .c language definition files | ||
| 6 | + * Created a slateGreen theme that matches my editor colors. :-) | ||
| 7 | + * | ||
| 8 | + | ||
| 1 | 9 | 0.2: | |
| 2 | - - Switched from Pygments to Highlight | ||
| 3 | - - Added thumbnailing support | ||
| 4 | - - Changed .tex UTI to agree with TeXShop's. | ||
| 5 | - - (Try to) let the system pick a different plugin if ours fails | ||
| 6 | - - Added UTIs for .css, .sql, .erl, and .sml | ||
| 10 | + * Switched from Pygments to Highlight. This should increase speed *and* language coverage. | ||
| 11 | + * Added thumbnailing support | ||
| 12 | + * Changed .tex UTI to agree with TeXShop's. | ||
| 13 | + * (Try to) let the system pick a different plugin if ours fails | ||
| 14 | + * Added UTIs for .css, .sql, .erl, and .sml | ||
| 7 | 15 | ||
| 8 | 16 | 0.1: Initial release | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,8 @@ | |||
| 12 | 12 | This function's job is to create thumbnail for designated file as fast as possible | |
| 13 | 13 | ----------------------------------------------------------------------------- */ | |
| 14 | 14 | ||
| 15 | - OSStatus GenerateThumbnailForURL(void *thisInterface, | ||
| 15 | + OSStatus | ||
| 16 | + GenerateThumbnailForURL(void *thisInterface, | ||
| 16 | 17 | QLThumbnailRequestRef thumbnail, | |
| 17 | 18 | CFURLRef url, | |
| 18 | 19 | CFStringRef contentTypeUTI, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -93,6 +93,8 @@ | |||
| 93 | 93 | <key>public.filename-extension</key> | |
| 94 | 94 | <array> | |
| 95 | 95 | <string>ml</string> | |
| 96 | + <string>mll</string> | ||
| 97 | + <string>mly</string> | ||
| 96 | 98 | </array> | |
| 97 | 99 | </dict> | |
| 98 | 100 | </dict> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,6 +33,9 @@ | |||
| 33 | 33 | 0ECBBA6C0CFCA37500416538 /* QLColorCode.qlgenerator in Copy to Library */ = {isa = PBXBuildFile; fileRef = 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */; }; | |
| 34 | 34 | 0EF57D440D122791006084D5 /* ide-xcode.style in Copy .style Files */ = {isa = PBXBuildFile; fileRef = 0EF57D430D122791006084D5 /* ide-xcode.style */; }; | |
| 35 | 35 | 0EF57D6E0D122934006084D5 /* objc.lang in Copy .lang Files */ = {isa = PBXBuildFile; fileRef = 0EF57D6D0D122934006084D5 /* objc.lang */; }; | |
| 36 | + 0EF57E6A0D125AB2006084D5 /* slateGreen.style in Copy .style Files */ = {isa = PBXBuildFile; fileRef = 0EF57E690D125AB2006084D5 /* slateGreen.style */; }; | ||
| 37 | + 0EF57F2F0D128219006084D5 /* c.lang in Copy .lang Files */ = {isa = PBXBuildFile; fileRef = 0EF57F2E0D128219006084D5 /* c.lang */; }; | ||
| 38 | + 0EF57F960D133EF7006084D5 /* css.lang in Copy .lang Files */ = {isa = PBXBuildFile; fileRef = 0EF57F7D0D133C0F006084D5 /* css.lang */; }; | ||
| 36 | 39 | 2C05A19C06CAA52B00D84F6F /* GeneratePreviewForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.m */; }; | |
| 37 | 40 | 61E3BCFB0870B4F2002186A0 /* GenerateThumbnailForURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.m */; }; | |
| 38 | 41 | 8D576312048677EA00EA77CD /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 08FB77B6FE84183AC02AAC07 /* main.c */; settings = {ATTRIBUTES = (); }; }; | |
@@ -71,6 +74,8 @@ | |||
| 71 | 74 | dstPath = override/langDefs; | |
| 72 | 75 | dstSubfolderSpec = 7; | |
| 73 | 76 | files = ( | |
| 77 | + 0EF57F960D133EF7006084D5 /* css.lang in Copy .lang Files */, | ||
| 78 | + 0EF57F2F0D128219006084D5 /* c.lang in Copy .lang Files */, | ||
| 74 | 79 | 0EF57D6E0D122934006084D5 /* objc.lang in Copy .lang Files */, | |
| 75 | 80 | 0EB496B10D0FC70D00E86E0B /* ml.lang in Copy .lang Files */, | |
| 76 | 81 | ); | |
@@ -94,6 +99,7 @@ | |||
| 94 | 99 | dstPath = override/themes; | |
| 95 | 100 | dstSubfolderSpec = 7; | |
| 96 | 101 | files = ( | |
| 102 | + 0EF57E6A0D125AB2006084D5 /* slateGreen.style in Copy .style Files */, | ||
| 97 | 103 | 0EF57D440D122791006084D5 /* ide-xcode.style in Copy .style Files */, | |
| 98 | 104 | ); | |
| 99 | 105 | name = "Copy .style Files"; | |
@@ -118,6 +124,10 @@ | |||
| 118 | 124 | 0ECBBB5D0CFD447E00416538 /* colorize.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = colorize.sh; sourceTree = "<group>"; }; | |
| 119 | 125 | 0EF57D430D122791006084D5 /* ide-xcode.style */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "ide-xcode.style"; sourceTree = "<group>"; }; | |
| 120 | 126 | 0EF57D6D0D122934006084D5 /* objc.lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = objc.lang; sourceTree = "<group>"; }; | |
| 127 | + 0EF57E4D0D123DD0006084D5 /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = "<group>"; }; | ||
| 128 | + 0EF57E690D125AB2006084D5 /* slateGreen.style */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = slateGreen.style; sourceTree = "<group>"; }; | ||
| 129 | + 0EF57F2E0D128219006084D5 /* c.lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = c.lang; sourceTree = "<group>"; }; | ||
| 130 | + 0EF57F7D0D133C0F006084D5 /* css.lang */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = css.lang; sourceTree = "<group>"; }; | ||
| 121 | 131 | 2C05A19B06CAA52B00D84F6F /* GeneratePreviewForURL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratePreviewForURL.m; sourceTree = "<group>"; }; | |
| 122 | 132 | 61E3BCFA0870B4F2002186A0 /* GenerateThumbnailForURL.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = GenerateThumbnailForURL.m; sourceTree = "<group>"; }; | |
| 123 | 133 | 8D576316048677EA00EA77CD /* QLColorCode.qlgenerator */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = QLColorCode.qlgenerator; sourceTree = BUILT_PRODUCTS_DIR; }; | |
@@ -151,6 +161,7 @@ | |||
| 151 | 161 | 0EC047F20CFC000A009C986E /* Notes.txt */, | |
| 152 | 162 | 0ECBBB360CFCF98600416538 /* ReadMe.txt */, | |
| 153 | 163 | 0E51C65F0D04E492007853CB /* ChangeLog.txt */, | |
| 164 | + 0EF57E4D0D123DD0006084D5 /* LICENSE.txt */, | ||
| 154 | 165 | 08FB77AFFE84173DC02AAC07 /* Source */, | |
| 155 | 166 | 089C167CFE841241C02AAC07 /* Resources */, | |
| 156 | 167 | 089C1671FE841209C02AAC07 /* External Frameworks and Libraries */, | |
@@ -176,9 +187,12 @@ | |||
| 176 | 187 | 089C167CFE841241C02AAC07 /* Resources */ = { | |
| 177 | 188 | isa = PBXGroup; | |
| 178 | 189 | children = ( | |
| 190 | + 0EF57F2E0D128219006084D5 /* c.lang */, | ||
| 191 | + 0EF57F7D0D133C0F006084D5 /* css.lang */, | ||
| 179 | 192 | 0EF57D6D0D122934006084D5 /* objc.lang */, | |
| 180 | 193 | 0EB4960D0D0FC24000E86E0B /* ml.lang */, | |
| 181 | 194 | 0EF57D430D122791006084D5 /* ide-xcode.style */, | |
| 195 | + 0EF57E690D125AB2006084D5 /* slateGreen.style */, | ||
| 182 | 196 | 0E913A090D10B8060067BAD6 /* filetypes.conf */, | |
| 183 | 197 | 8D576317048677EA00EA77CD /* Info.plist */, | |
| 184 | 198 | 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, | |
@@ -287,7 +301,7 @@ | |||
| 287 | 301 | ); | |
| 288 | 302 | runOnlyForDeploymentPostprocessing = 0; | |
| 289 | 303 | shellPath = "/bin/zsh -x"; | |
| 290 | - shellScript = "# shell script goes here\nif [ $BUILD_STYLE != \"Release\" ]; then\n echo \"Error: Must use Release build style\"\n exit 1\nfi\n\ncd $PROJECT_DIR\nmkdir -vp release\ncd release\npkgDir=QLColorCode-$CURRENT_PROJECT_VERSION\nrm -rf $pkgDir\nmkdir $pkgDir\ncp -rp $TARGET_BUILD_DIR/*.qlgenerator $pkgDir\ncp ../ReadMe.txt $pkgDir\ncp ../LICENSE.txt $pkgDir\ntar cvzf $pkgDir.tgz $pkgDir"; | ||
| 304 | + shellScript = "# shell script goes here\nif [ $BUILD_STYLE != \"Release\" ]; then\n echo \"Error: Must use Release build style\"\n exit 1\nfi\n\ncd $PROJECT_DIR\nmkdir -vp release\ncd release\npkgDir=QLColorCode-$CURRENT_PROJECT_VERSION\nrm -rf $pkgDir\nmkdir $pkgDir\ncp -rp $TARGET_BUILD_DIR/*.qlgenerator $pkgDir\ncp ../ReadMe.txt $pkgDir\ncp ../LICENSE.txt $pkgDir\ncp ../ChangeLog.txt $pkgDir\ntar cvzf $pkgDir.tgz $pkgDir"; | ||
| 291 | 305 | }; | |
| 292 | 306 | 0E9139D70D10A8320067BAD6 /* Install highlight */ = { | |
| 293 | 307 | isa = PBXShellScriptBuildPhase; | |
@@ -300,8 +314,8 @@ | |||
| 300 | 314 | outputPaths = ( | |
| 301 | 315 | ); | |
| 302 | 316 | runOnlyForDeploymentPostprocessing = 0; | |
| 303 | - shellPath = /bin/zsh; | ||
| 304 | - shellScript = "set err_exit\ncd $PROJECT_DIR/highlight\nmake\nmake \\\n\tDESTDIR=$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH \\\n\tPREFIX=/highlight/ \\\n\tinstall"; | ||
| 317 | + shellPath = "/bin/zsh -x"; | ||
| 318 | + shellScript = "set err_exit\ncd $PROJECT_DIR/highlight\nexport CFLAGS='-arch i386 -arch ppc'\nexport LDFLAGS=$CFLAGS\nmake\n# Make sure it was built universal\nlipo -info src/highlight | grep -q ppc || exit 1\nlipo -info src/highlight | grep -q i386 || exit 1\nmake \\\n\tDESTDIR=$BUILT_PRODUCTS_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH \\\n\tPREFIX=/highlight/ \\\n\tinstall\n\n"; | ||
| 305 | 319 | showEnvVarsInLog = 0; | |
| 306 | 320 | }; | |
| 307 | 321 | /* End PBXShellScriptBuildPhase section */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,60 @@ | |||
| 1 | + # C and C++ language definition file | ||
| 2 | + # | ||
| 3 | + # Author: Andre Simon | ||
| 4 | + # Mail: andre.simon1@gmx.de | ||
| 5 | + # Date: 24.7.2002 | ||
| 6 | + # updated 12.1.04 to add more types (ansi c, iso 99) | ||
| 7 | + # ------------------------------------------ | ||
| 8 | + # This file is a part of highlight, a free source code converter released under the GPL. | ||
| 9 | + # | ||
| 10 | + # The file is used to describe keywords and special symbols of programming languages. | ||
| 11 | + # See README in the highlight directory for details. | ||
| 12 | + # | ||
| 13 | + # New definition files for future releases of highlight are always appreciated ;) | ||
| 14 | + # | ||
| 15 | + # ---------- | ||
| 16 | + # andre.simon1@gmx.de | ||
| 17 | + # http:/www.andre-simon.de/ | ||
| 18 | + | ||
| 19 | + $DESCRIPTION=C and C++ | ||
| 20 | + | ||
| 21 | + $KW_LIST(kwa)=goto break return continue asm case default if else switch while for do sizeof | ||
| 22 | + typeof stdcall cdecl const_cast delete dynamic_cast goto namespace new pascal | ||
| 23 | + reinterpret_cast static_cast this throw try catch using true false bitand and bitor or xor | ||
| 24 | + compl and_eq or_eq xor_eq not not_eq | ||
| 25 | + | ||
| 26 | + $KW_LIST(kwb)=int long short char void signed unsigned float double size_t wchar_t | ||
| 27 | + ptrdiff_t sig_atomic_t fpos_t clock_t time_t va_list jmp_buf FILE DIR div_t ldiv_t static | ||
| 28 | + const bool struct union enum size_t wchar_t ptrdiff_t sig_atomic_t fpos_t clock_t time_t | ||
| 29 | + va_list jmp_buf FILE DIR div_t ldiv_t mbstate_t wctrans_t wint_t wctype_t bool complex | ||
| 30 | + int8_t int16_t int32_t int64_t uint8_t uint16_t uint32_t uint64_t int_least8_t int_least16_t | ||
| 31 | + int_least32_t int_least64_t uint_least8_t uint_least16_t uint_least32_t uint_least64_t | ||
| 32 | + int_fast8_t int_fast16_t int_fast32_t int_fast64_t uint_fast8_t uint_fast16_t uint_fast32_t | ||
| 33 | + uint_fast64_t intptr_t uintptr_t intmax_t uintmax_t | ||
| 34 | + | ||
| 35 | + $KW_LIST(kwc)=typedef inline auto class explicit extern friend inline mutable operator | ||
| 36 | + register template private protected public typeid virtual volatile | ||
| 37 | + | ||
| 38 | + $KW_RE(kwd)=regex((\w+?)\s*\() | ||
| 39 | + | ||
| 40 | + $KW_RE(fndef)=regex(^(?!typedef)[_a-zA-Z][*\w\t ]*(?:\n|[ \t])?[ \t]*[_a-zA-Z]\w*[ \t]*(?=\((?!\s*\*))) | ||
| 41 | + | ||
| 42 | + $STRINGDELIMITERS=" ' | ||
| 43 | + | ||
| 44 | + $SL_COMMENT=// | ||
| 45 | + | ||
| 46 | + $ML_COMMENT=/* */ | ||
| 47 | + | ||
| 48 | + $ALLOWNESTEDCOMMENTS=false | ||
| 49 | + | ||
| 50 | + $IGNORECASE=false | ||
| 51 | + | ||
| 52 | + $DIRECTIVE=# | ||
| 53 | + | ||
| 54 | + $ESCCHAR=\ | ||
| 55 | + | ||
| 56 | + $SYMBOLS= ( ) [ ] { } , ; . : & | < > ! = / * % + - ~ | ||
| 57 | + | ||
| 58 | + $CONTINUATIONSYMBOL=\ | ||
| 59 | + | ||
| 60 | + $REFORMATTING=true | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,6 +24,10 @@ | |||
| 24 | 24 | theme=ide-xcode | |
| 25 | 25 | font=Monaco | |
| 26 | 26 | fontSizePoints=9 | |
| 27 | + #theme=slateGreen | ||
| 28 | + #font=fixed | ||
| 29 | + # For some reason 10 points gives me Fixed at 13 points. | ||
| 30 | + #fontSizePoints=10 | ||
| 27 | 31 | ||
| 28 | 32 | ############################################################################### | |
| 29 | 33 | ||
@@ -42,7 +46,7 @@ cmdOpts=(-I --font $font --quiet --add-data-dir $rsrcDir/override \ | |||
| 42 | 46 | ||
| 43 | 47 | reader=(cat $target) | |
| 44 | 48 | if [ $thumb = "1" ]; then | |
| 45 | - filter=(head -n 50) | ||
| 49 | + filter=(head -n 100) | ||
| 46 | 50 | else | |
| 47 | 51 | filter=cat | |
| 48 | 52 | fi | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,65 @@ | |||
| 1 | + ## CSS language definition file | ||
| 2 | + # | ||
| 3 | + # Author: Andre Simon | ||
| 4 | + # Mail: andre.simon1@gmx.de | ||
| 5 | + # Date: 04.03.2003 | ||
| 6 | + # ------------------------------------------ | ||
| 7 | + # This file is a part of highlight, a free source code converter released under the GPL. | ||
| 8 | + # | ||
| 9 | + # The file is used to describe keywords and special symbols of programming languages. | ||
| 10 | + # See README in the highlight directory for details. | ||
| 11 | + # | ||
| 12 | + # New definition files for future releases of highlight are always appreciated ;) | ||
| 13 | + # | ||
| 14 | + # ---------- | ||
| 15 | + # andre.simon1@gmx.de | ||
| 16 | + # http:/www.andre-simon.de/ | ||
| 17 | + | ||
| 18 | + $KW_LIST(kwa)=background background-attachment background-color background-image | ||
| 19 | + background-position background-repeat border border-bottom border-bottom-width | ||
| 20 | + border-color border-left border-left-width border-right border-right-width | ||
| 21 | + border-style border-top border-top-width border-width clear color display float | ||
| 22 | + font font-family font-size font-style font-variant font-weight height | ||
| 23 | + letter-spacing line-height list-style list-style-image list-style-position | ||
| 24 | + list-style-type margin margin-bottom margin-left margin-right margin-top padding | ||
| 25 | + padding-bottom padding-left padding-right padding-top text-align text-decoration | ||
| 26 | + text-indent text-transform vertical-align white-space width word-spacing aqua auto | ||
| 27 | + baseline black blink block blue bold bolder both bottom capitalize center circle | ||
| 28 | + cursive dashed decimal disc dotted double fantasy fixed fuchsia gray green groove | ||
| 29 | + inline inset inside italic justify large larger left lighter lime line-through | ||
| 30 | + list-item lower-alpha lower-roman lowercase maroon medium middle monospace navy | ||
| 31 | + no-repeat none normal nowrap oblique olive outset outside overline purple red | ||
| 32 | + repeat repeat-x repeat-y rgb ridge right sans-serif scroll serif silver small | ||
| 33 | + small-caps smaller solid square sub super teal text-bottom text-top thick thin top | ||
| 34 | + transparent underline upper-alpha upper-roman uppercase url white x-large x-small | ||
| 35 | + xx-large xx-small yellow | ||
| 36 | + | ||
| 37 | + $KW_LIST(kwb)= a abbr acronym address applet area b base | ||
| 38 | + basefont bdo big blockquote body br button caption | ||
| 39 | + center cite code col colgroup dd del dfn | ||
| 40 | + dir div dl dt em fieldset font form | ||
| 41 | + frame frameset h1 h2 h3 h4 h5 h6 head hr html i iframe | ||
| 42 | + img input ins isindex kbd label legend li | ||
| 43 | + link map menu meta noframes noscript object ol | ||
| 44 | + optgroup option p param pre q s samp | ||
| 45 | + script select small span strike strong style sub | ||
| 46 | + sup table tbody td textarea tfoot th thead | ||
| 47 | + title tr tt u ul var | ||
| 48 | + | ||
| 49 | + $KW_RE(kwc)=regex(\.[a-zA-Z_]\w*) | ||
| 50 | + | ||
| 51 | + # Try to match class identifiers like "#foo" but not colors like "#fff". This | ||
| 52 | + # is quite problematic and unreliable, since we have to be context independent. | ||
| 53 | + $KW_RE(kwd)=regex(#(?[^0-9a-fA-F])[a-zA-Z_]\w*) | ||
| 54 | + | ||
| 55 | + $DIGIT=regex(#[0-9a-fA-F]{3}|#[0-9a-fA-F]{6}|\d*[\.]?\d+(?:[eE][\-\+]\d+)?) | ||
| 56 | + | ||
| 57 | + $STRINGDELIMITERS=" | ||
| 58 | + | ||
| 59 | + $ML_COMMENT=/* */ | ||
| 60 | + | ||
| 61 | + $IGNORECASE=true | ||
| 62 | + | ||
| 63 | + $IDENTIFIER=regex([a-zA-Z_][\w\-]*) | ||
| 64 | + | ||
| 65 | + $SYMBOLS= ( ) [ ] { } , ; : & | < > ! = / * % + - | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,7 @@ $ext(vb)=bas basic bi vbs | |||
| 19 | 19 | $ext(pl)=perl cgi pm plx plex | |
| 20 | 20 | $ext(rb)=ruby | |
| 21 | 21 | $ext(cob)=cobol | |
| 22 | - $ext(sh)=bash | ||
| 22 | + $ext(sh)=bash command | ||
| 23 | 23 | $ext(f77)=f F for ftn | |
| 24 | 24 | $ext(f90)=f95 | |
| 25 | 25 | $ext(xml)=html htm xhtml sgm sgml nrm ent hdr hub dtd wml vxml wml tld svg xsl | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,6 +15,9 @@ | |||
| 15 | 15 | # andre.simon1@gmx.de | |
| 16 | 16 | # http:/www.andre-simon.de/ | |
| 17 | 17 | ||
| 18 | + # Character literals | ||
| 19 | + $KW_RE(str)=regex('(?:[^\\]|\\.|\\[a-fA-F0-9]{2,3})') | ||
| 20 | + | ||
| 18 | 21 | $KW_LIST(kwa)=and as assert asr begin class constraint do done downto else | |
| 19 | 22 | end exception external false for fun function functor if in include inherit | |
| 20 | 23 | initializer land lazy let lor lsl lsr lxor match method mod module mutable new | |
@@ -23,13 +26,13 @@ while with | |||
| 23 | 26 | ||
| 24 | 27 | # Types and type variables | |
| 25 | 28 | $KW_LIST(kwb)=int float string char bool list exn array option format fpclass in_channel out_channel open_flag ref unit | |
| 26 | - $KW_RE(kwb)=regex('[a-zA-Z0-9_']+) | ||
| 29 | + $KW_RE(kwb)=regex('[a-zA-Z_]+|\b[A-Z][a-zA-Z0-9_']*) | ||
| 27 | 30 | ||
| 28 | 31 | # Modules | |
| 29 | 32 | $KW_RE(callr)=regex(\b[A-Z][a-zA-Z0-9_']*(?=\.)) | |
| 30 | 33 | ||
| 31 | - # Constructors | ||
| 32 | - $KW_RE(kwd)=regex(\b[A-Z][a-zA-Z0-9_']*) | ||
| 34 | + # Function defs | ||
| 35 | + $KW_RE(fndef)=regex(let([ \t]+rec)?[ \t]+([a-z][\w']*)[ \t]+[^=:,]) | ||
| 33 | 36 | ||
| 34 | 37 | $STRINGDELIMITERS=" | |
| 35 | 38 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,6 +15,8 @@ | |||
| 15 | 15 | # andre.simon1@gmx.de | |
| 16 | 16 | # http:/www.andre-simon.de/ | |
| 17 | 17 | ||
| 18 | + #### REMEMBER: \s includes \n! | ||
| 19 | + | ||
| 18 | 20 | $KW_LIST(kwa)=goto break return continue asm case default if else switch while for do sizeof typeof | |
| 19 | 21 | typedef inline stdcall auto cdecl class const_cast delete dynamic_cast explicit | |
| 20 | 22 | extern friend goto inline mutable namespace new operator pascal register reinterpret_cast private | |
@@ -29,9 +31,13 @@ volatile extern const bool struct union enum | |||
| 29 | 31 | ||
| 30 | 32 | $KW_RE(kwa)=regex(@\w+) | |
| 31 | 33 | ||
| 34 | + $KW_RE(fndef)=regex(^(?!typedef)[_a-zA-Z][*\w\t ]*(?:\n|[ \t])?[ \t]*[_a-zA-Z]\w*[ \t]*(?=\((?!\s*\*))) | ||
| 35 | + | ||
| 32 | 36 | $KW_RE(kwd)=regex((\w+?)\s*\() | |
| 33 | 37 | ||
| 34 | - $KW_RE(callr)=regex((?<=\[)\w+) | ||
| 38 | + # A method call target is any identifier inside an open bracket followed by | ||
| 39 | + # another identifier | ||
| 40 | + $KW_RE(callr)=regex((?<=\[)\s*\w+(?=\s+[_a-zA-Z])) | ||
| 35 | 41 | ||
| 36 | 42 | $KW_RE(str)=regex(@(?=")) | |
| 37 | 43 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments