Before

…lines 1–111 unchanged (111 lines)
112 " Make sure to unset it.
113 if exists('b:current_syntax')
114 let b:saved_current_syntax = b:current_syntax
115 unlet b:current_syntax
116 endif
117
118 echom '-- Including ' . a:filetype
119 exe 'syntax include @' . a:groupName . ' syntax/' . a:filetype . '.vim'
120
121 " Restore b:current_syntax
122 if exists('b:saved_current_syntax')
123 let b:current_syntax = b:saved_current_syntax
124 unlet b:saved_current_syntax
…lines 125–152 unchanged (28 lines)
153
154 call mediawiki#DefineRegion(a:filetype, groupName, a:wikiLang)
155endfunction
156
157" Perform highlighting
158function! mediawiki#PerformHighlighting()
159 echom '==== PerformHighlighting ===='
160 " Apply user overrides
161 call extend(s:mediawiki_wikilang_to_vim, g:mediawiki_wikilang_to_vim_overrides)
162
163 " Convert list into a dict
164 let ignoredDict = {}
165 for wikiLang in g:mediawiki_ignored_wikilang
166 let ignoredDict[wikiLang] = 1
167 endfor
168
169 let alreadyIncludedFt = {}
170 " Load languages
171 for wikiLang in mediawiki#FindLanguagesInBuffer() + g:mediawiki_forced_wikilang
172 echom 'Language: ' . wikiLang
173 if has_key(ignoredDict, wikiLang)
174 continue
175 endif
176
177 " Get corresponding filetype
178 if !has_key(s:mediawiki_wikilang_to_vim, wikiLang)
…lines 179–189 unchanged (11 lines)

After

…lines 1–110 unchanged (110 lines)
111 " Most syntax files no nothing if b:current_syntax is defined.
112 " Make sure to unset it.
113 if exists('b:current_syntax')
114 let b:saved_current_syntax = b:current_syntax
115 unlet b:current_syntax
116 endif
117
118 exe 'syntax include @' . a:groupName . ' syntax/' . a:filetype . '.vim'
119
120 " Restore b:current_syntax
121 if exists('b:saved_current_syntax')
122 let b:current_syntax = b:saved_current_syntax
123 unlet b:saved_current_syntax
…lines 124–151 unchanged (28 lines)
152
153 call mediawiki#DefineRegion(a:filetype, groupName, a:wikiLang)
154endfunction
155
156" Perform highlighting
157function! mediawiki#PerformHighlighting()
158 " Apply user overrides
159 call extend(s:mediawiki_wikilang_to_vim, g:mediawiki_wikilang_to_vim_overrides)
160
161 " Convert list into a dict
162 let ignoredDict = {}
163 for wikiLang in g:mediawiki_ignored_wikilang
164 let ignoredDict[wikiLang] = 1
165 endfor
166
167 let alreadyIncludedFt = {}
168 " Load languages
169 for wikiLang in mediawiki#FindLanguagesInBuffer() + g:mediawiki_forced_wikilang
170 if has_key(ignoredDict, wikiLang)
171 continue
172 endif
173
174 " Get corresponding filetype
175 if !has_key(s:mediawiki_wikilang_to_vim, wikiLang)
176 let msg = 'Warning: no filetype mapped to wiki language "' . wikiLang . '"'
…lines 177–186 unchanged (10 lines)

Before

script_file
comment "\" Known mappings"
let_statement (+443 nodes collapsed)
function_definition (+106 nodes collapsed)
comment "\" Include the syntax file for the given filetype"
function_definition
function "function"
bang
! "!"
function_declaration
identifier "mediawiki#IncludeSyntax"
parameters
( "("
identifier "filetype"
, ","
identifier "groupName"
) ")"
body
comment "\" Most syntax files no nothing if b:current_syntax is define"...
comment "\" Make sure to unset it."
if_statement (+23 nodes collapsed)
echomsg_statement
echomsg "echom"
binary_operation
string_literal "'-- Including '"
. "."
argument
a: "a:"
identifier "filetype"
execute_statement
execute "exe"
binary_operation
string_literal "'syntax include @'"
. "."
binary_operation
argument
a: "a:"
identifier "groupName"
. "."
binary_operation
string_literal "' syntax/'"
. "."
binary_operation
argument
a: "a:"
identifier "filetype"
. "."
string_literal "'.vim'"
comment "\" Restore b:current_syntax"
if_statement (+36 nodes collapsed)
endfunction "endfunction"
comment "\" Define the highlighted region. Must be called after Includ"...
function_definition (+84 nodes collapsed)
comment "\" Perform highlighting for a given wiki language"
function_definition (+83 nodes collapsed)
comment "\" Perform highlighting"
function_definition
function "function"
bang
! "!"
function_declaration
identifier "mediawiki#PerformHighlighting"
parameters
( "("
) ")"
body
echomsg_statement
echomsg "echom"
string_literal "'==== PerformHighlighting ===='"
comment "\" Apply user overrides"
call_statement
call "call"
call_expression
identifier "extend"
( "("
scoped_identifier
scope "s:"
identifier "mediawiki_wikilang_to_vim"
, ","
scoped_identifier
scope "g:"
identifier "mediawiki_wikilang_to_vim_overrides"
) ")"
comment "\" Convert list into a dict"
let_statement
let "let"
identifier "ignoredDict"
= "="
dictionnary
{ "{"
} "}"
for_loop
for "for"
identifier "wikiLang"
in "in"
scoped_identifier
scope "g:"
identifier "mediawiki_ignored_wikilang"
body
let_statement
let "let"
index_expression
identifier "ignoredDict"
[ "["
identifier "wikiLang"
] "]"
= "="
integer_literal "1"
endfor "endfor"
let_statement
let "let"
identifier "alreadyIncludedFt"
= "="
dictionnary
{ "{"
} "}"
comment "\" Load languages"
for_loop
for "for"
identifier "wikiLang"
in "in"
binary_operation
call_expression
identifier "mediawiki#FindLanguagesInBuffer"
( "("
) ")"
+ "+"
scoped_identifier
scope "g:"
identifier "mediawiki_forced_wikilang"
body
echomsg_statement
echomsg "echom"
field_expression
string_literal "'Language: '"
. "."
identifier "wikiLang"
if_statement
if "if"
call_expression
identifier "has_key"
( "("
identifier "ignoredDict"
, ","
identifier "wikiLang"
) ")"
body
continue_statement
continue "continue"
endif "endif"
comment "\" Get corresponding filetype"
if_statement (+37 nodes collapsed)
let_statement
let "let"
identifier "ft"
= "="
index_expression
scoped_identifier
scope "s:"
identifier "mediawiki_wikilang_to_vim"
[ "["
identifier "wikiLang"
] "]"
call_statement
call "call"
call_expression
identifier "mediawiki#HighlightWikiLang"
( "("
identifier "wikiLang"
, ","
identifier "ft"
, ","
identifier "alreadyIncludedFt"
) ")"
endfor "endfor"
endfunction "endfunction"

After

script_file
comment "\" Known mappings"
let_statement (+443 nodes collapsed)
function_definition (+106 nodes collapsed)
comment "\" Include the syntax file for the given filetype"
function_definition
function "function"
bang
! "!"
function_declaration
identifier "mediawiki#IncludeSyntax"
parameters
( "("
identifier "filetype"
, ","
identifier "groupName"
) ")"
body
comment "\" Most syntax files no nothing if b:current_syntax is define"...
comment "\" Make sure to unset it."
if_statement (+23 nodes collapsed)
execute_statement
execute "exe"
binary_operation
string_literal "'syntax include @'"
. "."
binary_operation
argument
a: "a:"
identifier "groupName"
. "."
binary_operation
string_literal "' syntax/'"
. "."
binary_operation
argument
a: "a:"
identifier "filetype"
. "."
string_literal "'.vim'"
comment "\" Restore b:current_syntax"
if_statement (+36 nodes collapsed)
endfunction "endfunction"
comment "\" Define the highlighted region. Must be called after Includ"...
function_definition (+84 nodes collapsed)
comment "\" Perform highlighting for a given wiki language"
function_definition (+83 nodes collapsed)
comment "\" Perform highlighting"
function_definition
function "function"
bang
! "!"
function_declaration
identifier "mediawiki#PerformHighlighting"
parameters
( "("
) ")"
body
comment "\" Apply user overrides"
call_statement
call "call"
call_expression
identifier "extend"
( "("
scoped_identifier
scope "s:"
identifier "mediawiki_wikilang_to_vim"
, ","
scoped_identifier
scope "g:"
identifier "mediawiki_wikilang_to_vim_overrides"
) ")"
comment "\" Convert list into a dict"
let_statement
let "let"
identifier "ignoredDict"
= "="
dictionnary
{ "{"
} "}"
for_loop
for "for"
identifier "wikiLang"
in "in"
scoped_identifier
scope "g:"
identifier "mediawiki_ignored_wikilang"
body
let_statement
let "let"
index_expression
identifier "ignoredDict"
[ "["
identifier "wikiLang"
] "]"
= "="
integer_literal "1"
endfor "endfor"
let_statement
let "let"
identifier "alreadyIncludedFt"
= "="
dictionnary
{ "{"
} "}"
comment "\" Load languages"
for_loop
for "for"
identifier "wikiLang"
in "in"
binary_operation
call_expression
identifier "mediawiki#FindLanguagesInBuffer"
( "("
) ")"
+ "+"
scoped_identifier
scope "g:"
identifier "mediawiki_forced_wikilang"
body
if_statement
if "if"
call_expression
identifier "has_key"
( "("
identifier "ignoredDict"
, ","
identifier "wikiLang"
) ")"
body
continue_statement
continue "continue"
endif "endif"
comment "\" Get corresponding filetype"
if_statement (+37 nodes collapsed)
let_statement
let "let"
identifier "ft"
= "="
index_expression
scoped_identifier
scope "s:"
identifier "mediawiki_wikilang_to_vim"
[ "["
identifier "wikiLang"
] "]"
call_statement
call "call"
call_expression
identifier "mediawiki#HighlightWikiLang"
( "("
identifier "wikiLang"
, ","
identifier "ft"
, ","
identifier "alreadyIncludedFt"
) ")"
endfor "endfor"
endfunction "endfunction"