Permalink
Browse files

ECL updates.

  • Loading branch information...
1 parent 85cb40b commit 9ff86797c22dcd5f8077022620f8ba15b8511869 @jeffbuttars committed Oct 2, 2012
Showing with 11 additions and 3 deletions.
  1. +6 −1 UltiSnips/ecl.snippets
  2. +5 −2 syntax/ecl.vim
View
7 UltiSnips/ecl.snippets
@@ -7,7 +7,7 @@ IMPORT ${1};${0}
endsnippet
snippet emod "EXPORT MODULE" b
-EXPORT ${1} := MODULE
+EXPORT ${1:`!v substitute(expand('%:t'), "\\..*$", '', 'g')`} := MODULE
${0}
END; // MODULE $1
endsnippet
@@ -71,6 +71,7 @@ ${1:resulttype }${2:funcname}(${3}) := FUNCTION
${4}
RETURN ${5};
END; //$2()${0}
+endsnippet
snippet idx "NAME := INDEX()"
IDX_${1} := INDEX(
@@ -89,3 +90,7 @@ EXPORT IDX_${1} := INDEX(
); // $1
${0}
endsnippet
+
+snippet ret "RETURN;"
+RETURN${1};$0
+endsnippet
View
7 syntax/ecl.vim
@@ -21,6 +21,7 @@ syn match eclBoolean '\<FALSE\>'
syn match eclFunction /\<SEQUENTIAL\>/
syn match eclFunction /\<APPLY\>/
+syn match eclMacro '\<FUNCTION\>'
syn match eclMacro '\<MACRO\>'
syn match eclMacro '\<FUNCTIONMACRO\>'
@@ -30,6 +31,7 @@ syn match eclFunction '\<XML\>\c'
syn match eclFunction '\<XPATH\>\c'
syn match eclFunction '\<XMLTEXT\>\c'
syn match eclFunction '\<NORMALIZE\>\c'
+syn match eclFunction '\<WHEN\>\c'
syn match eclFunction '\<PARSE\>\c'
syn match eclFunction '\<OUTPUT\>\c'
@@ -57,8 +59,9 @@ syntax region eclComment start="/\*" end="\*/" contains=eclTodo
syntax region eclString start="'" end="'"
-syntax region eclRecBlock start=/\<RECORD\>/ end=/\<END\>\s*;/ contains=ALL
-syntax region eclModBlock start=/\<MODULE\>/ end=/\<END\>\s*;/ contains=ALL
+syntax region eclRecBlock start=/\<RECORD\>/ end=/\<END\>\s*;/ fold transparent contains=ALL
+" syntax region eclModBlock start=/\<MODULE\>/ end=/\<END\>\s*;/ contains=ALL
+syntax region eclModBlock start="MODULE" end="END;" contains=ALL
syntax region eclTransBlock start=/\<TRANSFORM\>/ end=/\<END\>\s*;/ contains=ALL
syntax region eclFuncBlock start=/\<FUNCTION\>/ end=/\<END\>\s*;/ contains=ALL
syntax region eclMacroBlock start=/\<MACRO\>/ end=/\<ENDMACRO\>\s*;/ contains=ALL

0 comments on commit 9ff8679

Please sign in to comment.