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
|
2013-11-16 14:45:48 -05:00
|
|
|
import ${0:module}
|
2012-08-16 23:41:25 -04:00
|
|
|
|
|
|
|
# Function
|
|
|
|
snippet fun
|
2013-07-17 19:06:05 -04:00
|
|
|
function ${2:function_name}(${3})
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2013-07-17 19:06:05 -04:00
|
|
|
end
|
2012-08-16 23:41:25 -04:00
|
|
|
|
|
|
|
# Class
|
|
|
|
snippet class
|
|
|
|
class ${1:class_name}(${2:class_params})
|
2013-11-16 14:45:48 -05:00
|
|
|
${0:/* members/methods */}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
2013-07-17 19:06:05 -04:00
|
|
|
# If
|
2012-08-16 23:41:25 -04:00
|
|
|
snippet if
|
2022-09-25 06:10:28 -04:00
|
|
|
if ${1:condition}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# If else
|
|
|
|
snippet ife
|
2022-09-25 06:10:28 -04:00
|
|
|
if ${1:condition}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
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
|
2022-09-25 06:10:28 -04:00
|
|
|
elif ${1:condition}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
|
|
|
|
# Switch case
|
|
|
|
snippet switch
|
|
|
|
switch ${1:expression}
|
|
|
|
case ${2:item}
|
2013-11-16 14:45:48 -05:00
|
|
|
case ${0: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}
|
2013-11-16 14:45:48 -05:00
|
|
|
case ${0:TypeSpec}
|
2012-08-16 23:41:25 -04:00
|
|
|
default
|
|
|
|
end
|
|
|
|
|
|
|
|
# For/in Loop
|
|
|
|
snippet forin
|
|
|
|
for ${1:element} in ${2:container}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# For/to Loop
|
|
|
|
snippet forto
|
|
|
|
for ${1:lowerbound} to ${2:upperbound}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# While Loop
|
2013-11-16 14:45:48 -05:00
|
|
|
snippet wh
|
2012-08-16 23:41:25 -04:00
|
|
|
while ${1:conidition}
|
2013-11-16 14:45:48 -05:00
|
|
|
${0}
|
2012-08-16 23:41:25 -04:00
|
|
|
end
|