2012-08-16 23:41:25 -04:00
|
|
|
snippet #!
|
|
|
|
#!/usr/bin/env falcon
|
|
|
|
|
2013-07-17 19:06:05 -04:00
|
|
|
# Import
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet imp
|
|
|
|
import ${1:module}
|
|
|
|
|
|
|
|
# Function
|
|
|
|
snippet fun
|
2013-07-17 19:06:05 -04:00
|
|
|
function ${2:function_name}(${3})
|
|
|
|
${4}
|
|
|
|
end
|
2012-08-16 23:41:25 -04:00
|
|
|
|
|
|
|
# Class
|
|
|
|
snippet class
|
|
|
|
class ${1:class_name}(${2:class_params})
|
|
|
|
${3:/* members/methods */}
|
|
|
|
end
|
|
|
|
|
2013-07-17 19:06:05 -04:00
|
|
|
# If
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet if
|
|
|
|
if ${1:condition}
|
2013-07-17 19:06:05 -04:00
|
|
|
${2}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# If else
|
|
|
|
snippet ife
|
|
|
|
if ${1:condition}
|
2013-07-17 19:06:05 -04:00
|
|
|
${2}
|
2012-08-16 23:41:25 -04:00
|
|
|
else
|
2013-07-17 19:06:05 -04:00
|
|
|
${1}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
2013-07-17 19:06:05 -04:00
|
|
|
# If else if
|
|
|
|
snippet eif
|
2012-08-16 23:41:25 -04:00
|
|
|
elif ${1:condition}
|
2013-07-17 19:06:05 -04:00
|
|
|
${2}
|
2012-08-16 23:41:25 -04:00
|
|
|
|
|
|
|
# Switch case
|
|
|
|
snippet switch
|
|
|
|
switch ${1:expression}
|
|
|
|
case ${2:item}
|
|
|
|
case ${3:item}
|
2013-07-17 19:06:05 -04:00
|
|
|
default
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# Select
|
2013-07-17 19:06:05 -04:00
|
|
|
snippet select
|
2012-08-16 23:41:25 -04:00
|
|
|
select ${1:variable}
|
|
|
|
case ${2:TypeSpec}
|
|
|
|
case ${3:TypeSpec}
|
|
|
|
default
|
|
|
|
end
|
|
|
|
|
|
|
|
# For/in Loop
|
|
|
|
snippet forin
|
|
|
|
for ${1:element} in ${2:container}
|
2013-07-17 19:06:05 -04:00
|
|
|
${3}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# For/to Loop
|
|
|
|
snippet forto
|
|
|
|
for ${1:lowerbound} to ${2:upperbound}
|
2013-07-17 19:06:05 -04:00
|
|
|
${3}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# While Loop
|
2013-08-17 05:14:09 -04:00
|
|
|
snippet wh
|
2012-08-16 23:41:25 -04:00
|
|
|
while ${1:conidition}
|
2013-07-17 19:06:05 -04:00
|
|
|
${2}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|