[geany/geany] b1f93c: Add Zephir filetype
Colomban Wendling
git-noreply at xxxxx
Fri Apr 10 15:06:48 UTC 2015
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Thu, 15 May 2014 15:03:56 UTC
Commit: b1f93c29770a9de30c2172ce7ee6ad5ca981c9a4
https://github.com/geany/geany/commit/b1f93c29770a9de30c2172ce7ee6ad5ca981c9a4
Log Message:
-----------
Add Zephir filetype
Modified Paths:
--------------
data/Makefile.am
data/filetype_extensions.conf
data/filetypes.zephir
src/filetypes.c
src/filetypes.h
src/highlighting.c
src/highlightingmappings.h
src/symbols.c
Modified: data/Makefile.am
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -67,7 +67,8 @@ filetypes = \
filetypes.verilog \
filetypes.vhdl \
filetypes.xml \
- filetypes.yaml
+ filetypes.yaml \
+ filetypes.zephir
tagfiles = \
c99.tags \
Modified: data/filetype_extensions.conf
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -65,6 +65,7 @@ Verilog=*.v;
VHDL=*.vhd;*.vhdl;
XML=*.xml;*.sgml;*.xsl;*.xslt;*.xsd;*.xhtml;*.xul;*.dtd;
YAML=*.yaml;*.yml;
+Zephir=*.zep;
None=*;
# Note: restarting is required after editing groups
Modified: data/filetypes.zephir
24 lines changed, 24 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,24 @@
+# For complete documentation of this file, please see Geany's main documentation
+[styling=HTML]
+
+[keywords=HTML]
+# all items must be in one line
+# these are Zephir instructions, overriding PHP list
+php=abstract bool break case catch class const continue default empty else false fetch finally fixed float for foreach function if int integer interface isset let long namespace new null private protected public return static string switch this throw true try typeof uint ulong unlikely var void while
+
+[lexer_properties=PHP]
+
+[settings=PHP]
+# default extension used when saving files
+extension=zep
+
+[indentation]
+#width=4
+# 0 is spaces, 1 is tabs, 2 is tab & spaces
+#type=1
+
+[build_settings]
+# %f will be replaced by the complete filename
+# %e will be replaced by the filename without extension
+# (use only one of it at one time)
+compiler=zephir build
Modified: src/filetypes.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -189,6 +189,7 @@ static void init_builtin_filetypes(void)
FT_INIT( BATCH, NONE, "Batch", NULL, SCRIPT, SCRIPT );
FT_INIT( POWERSHELL, NONE, "PowerShell", NULL, SOURCE_FILE, SCRIPT );
FT_INIT( RUST, RUST, "Rust", NULL, SOURCE_FILE, COMPILED );
+ FT_INIT( ZEPHIR, ZEPHIR, "Zephir", NULL, SOURCE_FILE, COMPILED );
}
Modified: src/filetypes.h
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -95,6 +95,7 @@ typedef enum
GEANY_FILETYPES_BATCH,
GEANY_FILETYPES_POWERSHELL,
GEANY_FILETYPES_RUST,
+ GEANY_FILETYPES_ZEPHIR,
/* ^ append items here */
GEANY_MAX_BUILT_IN_FILETYPES /* Don't use this, use filetypes_array->len instead */
}
Modified: src/highlighting.c
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -1058,6 +1058,7 @@ void highlighting_init_styles(guint filetype_idx, GKeyFile *config, GKeyFile *co
init_styleset_case(VERILOG);
init_styleset_case(XML);
init_styleset_case(YAML);
+ init_styleset_case(ZEPHIR);
default:
if (ft->lexer_filetype)
geany_debug("Filetype %s has a recursive lexer_filetype %s set!",
@@ -1141,6 +1142,7 @@ void highlighting_set_styles(ScintillaObject *sci, GeanyFiletype *ft)
styleset_case(VERILOG);
styleset_case(XML);
styleset_case(YAML);
+ styleset_case(ZEPHIR);
case GEANY_FILETYPES_NONE:
default:
styleset_default(sci, ft->id);
Modified: src/highlightingmappings.h
7 lines changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -1559,4 +1559,11 @@ static const HLKeyword highlighting_keywords_YAML[] =
#define highlighting_properties_YAML EMPTY_PROPERTIES
+/* Zephir */
+#define highlighting_lexer_ZEPHIR SCLEX_PHPSCRIPT
+#define highlighting_styles_ZEPHIR highlighting_styles_PHP
+#define highlighting_keywords_ZEPHIR highlighting_keywords_PHP
+#define highlighting_properties_ZEPHIR highlighting_properties_PHP
+
+
#endif /* guard */
Modified: src/symbols.c
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -301,6 +301,7 @@ const gchar *symbols_get_context_separator(gint ft_id)
/*case GEANY_FILETYPES_RUBY:*/ /* not sure what to use atm*/
case GEANY_FILETYPES_PHP:
case GEANY_FILETYPES_RUST:
+ case GEANY_FILETYPES_ZEPHIR:
return "::";
/* avoid confusion with other possible separators in group/section name */
@@ -767,6 +768,7 @@ static void add_top_level_items(GeanyDocument *doc)
break;
}
case GEANY_FILETYPES_PHP:
+ case GEANY_FILETYPES_ZEPHIR:
{
tag_list_add_groups(tag_store,
&(tv_iters.tag_namespace), _("Namespaces"), "classviewer-namespace",
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list