text
stringlengths
0
15.7k
source
stringlengths
6
112
else if newTag does not start with "*" then
cljs-generator.applescript
set addition to my addToList(newTag, funcs, namespaces)
cljs-generator.applescript
set AppleScript's text item delimiters to oldTID
cljs-generator.applescript
set inputReference to open for access cljCore
cljs-generator.applescript
if namespaces does not contain newTag then
cljs-generator.applescript
if text of defs = "(defmacro " then
cljs-generator.applescript
set addition to my addToList(newMacro, macros, namespaces)
cljs-generator.applescript
set addition to my addToList(newTag, macros, namespaces)
cljs-generator.applescript
set constText to "syntax keyword cljsConstants " & const as text
cljs-generator.applescript
set boolText to "syntax keyword cljsBoolean " & bool as text
cljs-generator.applescript
set specialText to "syntax keyword cljsSpecial " & special as text
cljs-generator.applescript
set exceptionText to "syntax keyword cljsException " & exception as text
cljs-generator.applescript
set condText to "syntax keyword cljsCond " & cond as text
cljs-generator.applescript
set repeaterText to "syntax keyword cljsRepeat " & repeater as text
cljs-generator.applescript
set defineText to "syntax keyword cljsDefine " & define as text
cljs-generator.applescript
set reservedText to "syntax keyword cljsReserved " & jsReserved as text
cljs-generator.applescript
set macroText to "syntax keyword cljsMacro " & macros as text
cljs-generator.applescript
set funcText to "syntax keyword cljsFunc " & funcs as text
cljs-generator.applescript
set theText to specialText & "
cljs-generator.applescript
" & exceptionText & "
cljs-generator.applescript
" & condText & "
cljs-generator.applescript
" & repeaterText & "
cljs-generator.applescript
" & defineText & "
cljs-generator.applescript
" & reservedText & "
cljs-generator.applescript
" & macroText & "
cljs-generator.applescript
" & "
cljs-generator.applescript
" & funcText
cljs-generator.applescript
set outputQuery to display dialog "Enter the name of the output file here: " default answer "" & "cljs.vim"
cljs-generator.applescript
set outputName to text returned of outputQuery
cljs-generator.applescript
set buildFolder to (choose folder with prompt "Please select a location for the scan output") as alias
cljs-generator.applescript
set buildFile to make new file at buildFolder with properties {name:outputName}
cljs-generator.applescript
set buildFile to buildFile as text
cljs-generator.applescript
set the fileReference to open for access file buildFile with write permission
cljs-generator.applescript
write theText to fileReference
cljs-generator.applescript
close access the fileReference
cljs-generator.applescript
tell application "Finder" to display dialog "all done!"
cljs-generator.applescript
on parseSyn(info, coll, starting)
cljs-generator.applescript
set AppleScript's text item delimiters to starting
cljs-generator.applescript
set stuff to text item 2 of info
cljs-generator.applescript
set woot to text 1 thru ((offset of "syntax keyword " in stuff) - 1) of stuff
cljs-generator.applescript
set counter to count of text items in woot
cljs-generator.applescript
set namespaces to "clojure.core"
cljs-generator.applescript
set type to word 3 of starting
cljs-generator.applescript
set manyTypes to {"clojureConstant", "clojureBoolean", "clojureSpecial", "clojureException"} as text
cljs-generator.applescript
repeat with i from 1 to counter
cljs-generator.applescript
set oneItem to text item i of woot
cljs-generator.applescript
set excludeCount to count of text items in excludes
cljs-generator.applescript
set theCount to count of text items in oneItem
cljs-generator.applescript
repeat with j from 2 to theCount
cljs-generator.applescript
set target to text item j of oneItem
cljs-generator.applescript
set nameTar to namespaces & target
cljs-generator.applescript
set alert to {}
cljs-generator.applescript
if target contains namespaces then
cljs-generator.applescript
copy 1 to end of alert
cljs-generator.applescript
if type is in manyTypes then
cljs-generator.applescript
repeat with k from 1 to excludeCount
cljs-generator.applescript
set ex to text item k of excludes
cljs-generator.applescript
if target is ex then
cljs-generator.applescript
copy target to end of found
cljs-generator.applescript
if (count of found) is 0 then
cljs-generator.applescript
if (count of alert) is 0 then
cljs-generator.applescript
copy target to end of coll
cljs-generator.applescript
copy nameTar to end of coll
cljs-generator.applescript
set newColl to {}
cljs-generator.applescript
repeat with l in coll
cljs-generator.applescript
set spaced to l & " "
cljs-generator.applescript
copy spaced to end of newColl
cljs-generator.applescript
return newColl
cljs-generator.applescript
end parseSyn
cljs-generator.applescript
on addToList(itemName, listName, namespace)
cljs-generator.applescript
if itemName is not "" then
cljs-generator.applescript
set itemName to my replaceChars(itemName, "
cljs-generator.applescript
set namespace to my replaceChars(namespace, " ", "")
cljs-generator.applescript
set sinNamespace to namespace & " " as text
cljs-generator.applescript
set dblNamespace to namespace & namespace & " " as text
cljs-generator.applescript
if itemName does not start with "^" then
cljs-generator.applescript
if badStuff does not contain itemName then
cljs-generator.applescript
set namespaceItem to namespace & itemName & " "
cljs-generator.applescript
if listName does not contain namespaceItem and namespaceItem is not equal to sinNamespace then
cljs-generator.applescript
if namespaceItem is not equal to dblNamespace then
cljs-generator.applescript
set fixedName to itemName & " "
cljs-generator.applescript
if specialGroup contains itemName then
cljs-generator.applescript
if special does not contain itemName then
cljs-generator.applescript
copy namespaceItem to end of special
cljs-generator.applescript
copy fixedName to end of special
cljs-generator.applescript
else if condGroup contains itemName then
cljs-generator.applescript
if cond does not contain itemName then
cljs-generator.applescript
copy namespaceItem to end of cond
cljs-generator.applescript
copy fixedName to end of cond
cljs-generator.applescript
else if repeatGroup contains itemName then
cljs-generator.applescript
if repeater does not contain itemName then
cljs-generator.applescript
copy namespaceItem to end of repeater
cljs-generator.applescript
copy fixedName to end of repeater
cljs-generator.applescript
else if defineGroup contains itemName then
cljs-generator.applescript
if define does not contain itemName then
cljs-generator.applescript
copy namespaceItem to end of define
cljs-generator.applescript
copy fixedName to end of define
cljs-generator.applescript
copy namespaceItem to end of listName
cljs-generator.applescript
set itemName to itemName & " "
cljs-generator.applescript
if listName does not contain itemName and itemName is not equal to sinNamespace then
cljs-generator.applescript