Hi everyone,
I'm new a the list, so just a few word to introduce myself : I am mostly a PHP developer and I often write for the french magazine "GNU/Linux Magazine France". I'm using Geany on a daily basis for a long time, and enjoy it more than any other IDE.
As a PHP developper, I recently discover a new programming language, dedicated to native PHP extensions. Its name is Zephir, you could learn more here : http://zephir-lang.com. Its philosophy is to associate the PHP syntax style with the efficiency of C to enable long-time PHP developer to run easily their own extensions as fast as C ones and to code them as quickly as PHP scripts.
So I adopted Zephir, and will certainly use it on a daily basis, as Geany. So I naturally tried to code Zephir sources with Geany and to make my own /filestype.Zephir.conf/. You can see the current state of this work here : https://github.com/taophp/zephir-geany-fileconf
The fact is that if I set the Zephir file as a PHP file using the menu /Document->Set filetype/ (I suppose, my geany front end is in French), the symbols tabs detects all my classes, functions, properties, and all perfectly, but in the editing area, there is no syntax highlighting until I add the opening PHP tag "<?php" - but the Zephir compiler will not accept it. My first attempt to solve this issue was to copy the filetypes.php in a filetypes.Zephir.conf, and then tried to modify it to avoid the need of the opening PHP tag. My second attempt was to find another filetypes.* that fit more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Could anyone could tell me how to deal with this issue ?
Regards,
Stéphane Mourey
Hi,
On 15/05/14 09:07, Stéphane Mourey wrote:
The fact is that if I set the Zephir file as a PHP file using the menu /Document->Set filetype/ (I suppose, my geany front end is in French), the symbols tabs detects all my classes, functions, properties, and all perfectly, but in the editing area, there is no syntax highlighting until I add the opening PHP tag "<?php" - but the Zephir compiler will not accept it. My first attempt to solve this issue was to copy the filetypes.php in a filetypes.Zephir.conf, and then tried to modify it to avoid the need of the opening PHP tag. My second attempt was to find another filetypes.* that fit more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Could anyone could tell me how to deal with this issue ?
If you create your own filetype, you can specify a tag_parser[1] in the [settings] section. For you "tag_parser=PHP" should give correct tags.
Cheers, Johannes
[1]http://www.geany.org/manual/current/index.html#tag-parser
On 15 May 2014 17:07, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Hi everyone,
I'm new a the list, so just a few word to introduce myself : I am mostly a PHP developer and I often write for the french magazine "GNU/Linux Magazine France". I'm using Geany on a daily basis for a long time, and enjoy it more than any other IDE.
As a PHP developper, I recently discover a new programming language, dedicated to native PHP extensions. Its name is Zephir, you could learn more here : http://zephir-lang.com. Its philosophy is to associate the PHP syntax style with the efficiency of C to enable long-time PHP developer to run easily their own extensions as fast as C ones and to code them as quickly as PHP scripts.
So I adopted Zephir, and will certainly use it on a daily basis, as Geany. So I naturally tried to code Zephir sources with Geany and to make my own filestype.Zephir.conf. You can see the current state of this work here : https://github.com/taophp/zephir-geany-fileconf
The fact is that if I set the Zephir file as a PHP file using the menu Document->Set filetype (I suppose, my geany front end is in French), the symbols tabs detects all my classes, functions, properties, and all perfectly, but in the editing area, there is no syntax highlighting until I add the opening PHP tag "<?php" - but the Zephir compiler will not accept it. My first attempt to solve this issue was to copy the filetypes.php in a filetypes.Zephir.conf, and then tried to modify it to avoid the need of the opening PHP tag. My second attempt was to find another filetypes.* that fit more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Strange, if I take the "hello world" example from the zephir-lang docs and simply set filetype C# both highlighting and symbols work. So setting both lexer_filetype and tag_parser to C# in the custom filetype file should work.
Cheers Lex
Could anyone could tell me how to deal with this issue ?
Regards,
Stéphane Mourey
Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
[...]
more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Strange, if I take the "hello world" example from the zephir-lang docs and simply set filetype C# both highlighting and symbols work. So setting both lexer_filetype and tag_parser to C# in the custom filetype file should work.
Cheers Lex
PS maybe you could just add whatever is the zephyr file extension to the list for C# in filetype_extensions.conf
Could anyone could tell me how to deal with this issue ?
Regards,
Stéphane Mourey
Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Thanks all for your help! I got it! I know what puts the mess in the symbols : it's the Return Type Hint (http://zephir-lang.com/oop.html#return-type-hints). So if you change the Hello World example this way :
namespace Test;
class Hello { /** * This is a sample method */ public function returnHello()_* -> string*_ { return "Hello World!"; } }
Highlighting is correct but the symbols do not appears correctly when setting the document type to C#.
What can I do ?
Le 15/05/2014 10:14, Lex Trotman a écrit :
On 15 May 2014 17:07, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Hi everyone,
I'm new a the list, so just a few word to introduce myself : I am mostly a PHP developer and I often write for the french magazine "GNU/Linux Magazine France". I'm using Geany on a daily basis for a long time, and enjoy it more than any other IDE.
As a PHP developper, I recently discover a new programming language, dedicated to native PHP extensions. Its name is Zephir, you could learn more here : http://zephir-lang.com. Its philosophy is to associate the PHP syntax style with the efficiency of C to enable long-time PHP developer to run easily their own extensions as fast as C ones and to code them as quickly as PHP scripts.
So I adopted Zephir, and will certainly use it on a daily basis, as Geany. So I naturally tried to code Zephir sources with Geany and to make my own filestype.Zephir.conf. You can see the current state of this work here : https://github.com/taophp/zephir-geany-fileconf
The fact is that if I set the Zephir file as a PHP file using the menu Document->Set filetype (I suppose, my geany front end is in French), the symbols tabs detects all my classes, functions, properties, and all perfectly, but in the editing area, there is no syntax highlighting until I add the opening PHP tag "<?php" - but the Zephir compiler will not accept it. My first attempt to solve this issue was to copy the filetypes.php in a filetypes.Zephir.conf, and then tried to modify it to avoid the need of the opening PHP tag. My second attempt was to find another filetypes.* that fit more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Strange, if I take the "hello world" example from the zephir-lang docs and simply set filetype C# both highlighting and symbols work. So setting both lexer_filetype and tag_parser to C# in the custom filetype file should work.
Cheers Lex
Could anyone could tell me how to deal with this issue ?
Regards,
Stéphane Mourey
Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 15 May 2014 19:50, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Thanks all for your help! I got it! I know what puts the mess in the symbols : it's the Return Type Hint (http://zephir-lang.com/oop.html#return-type-hints). So if you change the Hello World example this way :
namespace Test;
class Hello { /** * This is a sample method */ public function returnHello() -> string { return "Hello World!"; } }
Highlighting is correct but the symbols do not appears correctly when setting the document type to C#.
What can I do ?
To explain a little.
Highlighting is purely based on lexical analysis, that is, just the tokens in the language, and there is a remarkable similarity between languages. So its easy to get a lexer from another language to work (albeit with a different list of keywords). This is done so that highlighting will work as you type, even if the file does not yet represent a legal program in the language you are writing it in.
But locating symbols requires the file to be actually parsed, that is the language syntax must match the syntax that the parser is looking for. If the syntax is wrong it will not parse correctly. So if zephyr declaration syntax does not match some other language, then no existing parser is going to understand it.
The parsers are an adaptation of those from the ctags project (http://ctags.sourceforge.net/) and are written in C. You would have to make a zephyr specific parser, possibly by modifying an existing parser.
Cheers Lex
Le 15/05/2014 10:14, Lex Trotman a écrit :
On 15 May 2014 17:07, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Hi everyone,
I'm new a the list, so just a few word to introduce myself : I am mostly a PHP developer and I often write for the french magazine "GNU/Linux Magazine France". I'm using Geany on a daily basis for a long time, and enjoy it more than any other IDE.
As a PHP developper, I recently discover a new programming language, dedicated to native PHP extensions. Its name is Zephir, you could learn more here : http://zephir-lang.com. Its philosophy is to associate the PHP syntax style with the efficiency of C to enable long-time PHP developer to run easily their own extensions as fast as C ones and to code them as quickly as PHP scripts.
So I adopted Zephir, and will certainly use it on a daily basis, as Geany. So I naturally tried to code Zephir sources with Geany and to make my own filestype.Zephir.conf. You can see the current state of this work here : https://github.com/taophp/zephir-geany-fileconf
The fact is that if I set the Zephir file as a PHP file using the menu Document->Set filetype (I suppose, my geany front end is in French), the symbols tabs detects all my classes, functions, properties, and all perfectly, but in the editing area, there is no syntax highlighting until I add the opening PHP tag "<?php" - but the Zephir compiler will not accept it. My first attempt to solve this issue was to copy the filetypes.php in a filetypes.Zephir.conf, and then tried to modify it to avoid the need of the opening PHP tag. My second attempt was to find another filetypes.* that fit more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Strange, if I take the "hello world" example from the zephir-lang docs and simply set filetype C# both highlighting and symbols work. So setting both lexer_filetype and tag_parser to C# in the custom filetype file should work.
Cheers Lex
Could anyone could tell me how to deal with this issue ?
Regards,
Stéphane Mourey
Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
-- Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Thank you, Lex, for your useful explanation.
So, now, I think that I do not need to make a new parser for Zephir, as the PHP one works to locate Zephir symbols, at least for classes and methods which are the most useful symbols for me. Some work is certainly required for properties and variables, but I can live without for a while.
So setting Zephir files to the PHP type make the trick for symbols locating, but what about highlighting? Can I set Geany to use the PHP parser but not expect the PHP opening tag ?
Regards,
Stéphane
Le 15/05/2014 13:09, Lex Trotman a écrit :
On 15 May 2014 19:50, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Thanks all for your help! I got it! I know what puts the mess in the symbols : it's the Return Type Hint (http://zephir-lang.com/oop.html#return-type-hints). So if you change the Hello World example this way :
namespace Test;
class Hello { /** * This is a sample method */ public function returnHello() -> string { return "Hello World!"; } }
Highlighting is correct but the symbols do not appears correctly when setting the document type to C#.
What can I do ?
To explain a little.
Highlighting is purely based on lexical analysis, that is, just the tokens in the language, and there is a remarkable similarity between languages. So its easy to get a lexer from another language to work (albeit with a different list of keywords). This is done so that highlighting will work as you type, even if the file does not yet represent a legal program in the language you are writing it in.
But locating symbols requires the file to be actually parsed, that is the language syntax must match the syntax that the parser is looking for. If the syntax is wrong it will not parse correctly. So if zephyr declaration syntax does not match some other language, then no existing parser is going to understand it.
The parsers are an adaptation of those from the ctags project (http://ctags.sourceforge.net/) and are written in C. You would have to make a zephyr specific parser, possibly by modifying an existing parser.
Cheers Lex
Le 15/05/2014 10:14, Lex Trotman a écrit :
On 15 May 2014 17:07, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Hi everyone,
I'm new a the list, so just a few word to introduce myself : I am mostly a PHP developer and I often write for the french magazine "GNU/Linux Magazine France". I'm using Geany on a daily basis for a long time, and enjoy it more than any other IDE.
As a PHP developper, I recently discover a new programming language, dedicated to native PHP extensions. Its name is Zephir, you could learn more here : http://zephir-lang.com. Its philosophy is to associate the PHP syntax style with the efficiency of C to enable long-time PHP developer to run easily their own extensions as fast as C ones and to code them as quickly as PHP scripts.
So I adopted Zephir, and will certainly use it on a daily basis, as Geany. So I naturally tried to code Zephir sources with Geany and to make my own filestype.Zephir.conf. You can see the current state of this work here : https://github.com/taophp/zephir-geany-fileconf
The fact is that if I set the Zephir file as a PHP file using the menu Document->Set filetype (I suppose, my geany front end is in French), the symbols tabs detects all my classes, functions, properties, and all perfectly, but in the editing area, there is no syntax highlighting until I add the opening PHP tag "<?php" - but the Zephir compiler will not accept it. My first attempt to solve this issue was to copy the filetypes.php in a filetypes.Zephir.conf, and then tried to modify it to avoid the need of the opening PHP tag. My second attempt was to find another filetypes.* that fit more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Strange, if I take the "hello world" example from the zephir-lang docs and simply set filetype C# both highlighting and symbols work. So setting both lexer_filetype and tag_parser to C# in the custom filetype file should work.
Cheers Lex
Could anyone could tell me how to deal with this issue ?
Regards,
Stéphane Mourey
Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
-- Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
On 15 May 2014 22:00, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Thank you, Lex, for your useful explanation.
So, now, I think that I do not need to make a new parser for Zephir, as the PHP one works to locate Zephir symbols, at least for classes and methods which are the most useful symbols for me. Some work is certainly required for properties and variables, but I can live without for a while.
I presume you mean it works if you start the file with <?.
So setting Zephir files to the PHP type make the trick for symbols locating, but what about highlighting? Can I set Geany to use the PHP parser but not expect the PHP opening tag ?
My quick look shows it is hard coded in the PHP parser to expect <?php or <? so no it can't be set. This makes sense as the PHP language specifies that its parser only looks at code inside these tags.
Cheers Lex
Regards,
Stéphane
Le 15/05/2014 13:09, Lex Trotman a écrit :
On 15 May 2014 19:50, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Thanks all for your help! I got it! I know what puts the mess in the symbols : it's the Return Type Hint (http://zephir-lang.com/oop.html#return-type-hints). So if you change the Hello World example this way :
namespace Test;
class Hello { /** * This is a sample method */ public function returnHello() -> string { return "Hello World!"; } }
Highlighting is correct but the symbols do not appears correctly when setting the document type to C#.
What can I do ?
To explain a little.
Highlighting is purely based on lexical analysis, that is, just the tokens in the language, and there is a remarkable similarity between languages. So its easy to get a lexer from another language to work (albeit with a different list of keywords). This is done so that highlighting will work as you type, even if the file does not yet represent a legal program in the language you are writing it in.
But locating symbols requires the file to be actually parsed, that is the language syntax must match the syntax that the parser is looking for. If the syntax is wrong it will not parse correctly. So if zephyr declaration syntax does not match some other language, then no existing parser is going to understand it.
The parsers are an adaptation of those from the ctags project (http://ctags.sourceforge.net/) and are written in C. You would have to make a zephyr specific parser, possibly by modifying an existing parser.
Cheers Lex
Le 15/05/2014 10:14, Lex Trotman a écrit :
On 15 May 2014 17:07, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Hi everyone,
I'm new a the list, so just a few word to introduce myself : I am mostly a PHP developer and I often write for the french magazine "GNU/Linux Magazine France". I'm using Geany on a daily basis for a long time, and enjoy it more than any other IDE.
As a PHP developper, I recently discover a new programming language, dedicated to native PHP extensions. Its name is Zephir, you could learn more here : http://zephir-lang.com. Its philosophy is to associate the PHP syntax style with the efficiency of C to enable long-time PHP developer to run easily their own extensions as fast as C ones and to code them as quickly as PHP scripts.
So I adopted Zephir, and will certainly use it on a daily basis, as Geany. So I naturally tried to code Zephir sources with Geany and to make my own filestype.Zephir.conf. You can see the current state of this work here : https://github.com/taophp/zephir-geany-fileconf
The fact is that if I set the Zephir file as a PHP file using the menu Document->Set filetype (I suppose, my geany front end is in French), the symbols tabs detects all my classes, functions, properties, and all perfectly, but in the editing area, there is no syntax highlighting until I add the opening PHP tag "<?php" - but the Zephir compiler will not accept it. My first attempt to solve this issue was to copy the filetypes.php in a filetypes.Zephir.conf, and then tried to modify it to avoid the need of the opening PHP tag. My second attempt was to find another filetypes.* that fit more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Strange, if I take the "hello world" example from the zephir-lang docs and simply set filetype C# both highlighting and symbols work. So setting both lexer_filetype and tag_parser to C# in the custom filetype file should work.
Cheers Lex
Could anyone could tell me how to deal with this issue ?
Regards,
Stéphane Mourey
Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
-- Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
-- Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Well, thanks for your time. I may have look one day. Meanwhile, the trick is to start with a commented PHP opening tag like this : // <?php
Cheers!
Stephane
Le 15/05/2014 15:13, Lex Trotman a écrit :
On 15 May 2014 22:00, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Thank you, Lex, for your useful explanation.
So, now, I think that I do not need to make a new parser for Zephir, as the PHP one works to locate Zephir symbols, at least for classes and methods which are the most useful symbols for me. Some work is certainly required for properties and variables, but I can live without for a while.
I presume you mean it works if you start the file with <?.
So setting Zephir files to the PHP type make the trick for symbols locating, but what about highlighting? Can I set Geany to use the PHP parser but not expect the PHP opening tag ?
My quick look shows it is hard coded in the PHP parser to expect <?php or <? so no it can't be set. This makes sense as the PHP language specifies that its parser only looks at code inside these tags.
Cheers Lex
Regards,
Stéphane
Le 15/05/2014 13:09, Lex Trotman a écrit :
On 15 May 2014 19:50, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Thanks all for your help! I got it! I know what puts the mess in the symbols : it's the Return Type Hint (http://zephir-lang.com/oop.html#return-type-hints). So if you change the Hello World example this way :
namespace Test;
class Hello { /** * This is a sample method */ public function returnHello() -> string { return "Hello World!"; } }
Highlighting is correct but the symbols do not appears correctly when setting the document type to C#.
What can I do ?
To explain a little.
Highlighting is purely based on lexical analysis, that is, just the tokens in the language, and there is a remarkable similarity between languages. So its easy to get a lexer from another language to work (albeit with a different list of keywords). This is done so that highlighting will work as you type, even if the file does not yet represent a legal program in the language you are writing it in.
But locating symbols requires the file to be actually parsed, that is the language syntax must match the syntax that the parser is looking for. If the syntax is wrong it will not parse correctly. So if zephyr declaration syntax does not match some other language, then no existing parser is going to understand it.
The parsers are an adaptation of those from the ctags project (http://ctags.sourceforge.net/) and are written in C. You would have to make a zephyr specific parser, possibly by modifying an existing parser.
Cheers Lex
Le 15/05/2014 10:14, Lex Trotman a écrit :
On 15 May 2014 17:07, Stéphane Mourey stephane.mourey@impossible-exil.info wrote:
Hi everyone,
I'm new a the list, so just a few word to introduce myself : I am mostly a PHP developer and I often write for the french magazine "GNU/Linux Magazine France". I'm using Geany on a daily basis for a long time, and enjoy it more than any other IDE.
As a PHP developper, I recently discover a new programming language, dedicated to native PHP extensions. Its name is Zephir, you could learn more here : http://zephir-lang.com. Its philosophy is to associate the PHP syntax style with the efficiency of C to enable long-time PHP developer to run easily their own extensions as fast as C ones and to code them as quickly as PHP scripts.
So I adopted Zephir, and will certainly use it on a daily basis, as Geany. So I naturally tried to code Zephir sources with Geany and to make my own filestype.Zephir.conf. You can see the current state of this work here : https://github.com/taophp/zephir-geany-fileconf
The fact is that if I set the Zephir file as a PHP file using the menu Document->Set filetype (I suppose, my geany front end is in French), the symbols tabs detects all my classes, functions, properties, and all perfectly, but in the editing area, there is no syntax highlighting until I add the opening PHP tag "<?php" - but the Zephir compiler will not accept it. My first attempt to solve this issue was to copy the filetypes.php in a filetypes.Zephir.conf, and then tried to modify it to avoid the need of the opening PHP tag. My second attempt was to find another filetypes.* that fit more my needs. My choice was filetypes.cs, and this was the base of my project on Gitbub. Now syntax highlighting is correct, but the symbols tab does not work...
Strange, if I take the "hello world" example from the zephir-lang docs and simply set filetype C# both highlighting and symbols work. So setting both lexer_filetype and tag_parser to C# in the custom filetype file should work.
Cheers Lex
Could anyone could tell me how to deal with this issue ?
Regards,
Stéphane Mourey
Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
-- Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
-- Blog: Impossible Exil Bitmessage: BM-2D7keexEn8tGyYBEqGt88U2CZtpEnRzZor
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Hi,
Le 15/05/2014 17:17, Stéphane Mourey a écrit :
Well, thanks for your time. I may have look one day.
I created https://github.com/geany/geany/pull/270 which was fairly straightforward. It's not much tested as I don't know Zephir (yet?), but should work fine. One limitation however is that it won't parse variables as it seems Zephir don't use $ mark, but that could probably be fixed relatively easily if knowing the language.
Meanwhile, the trick is to start with a commented PHP opening tag like this : // <?php
Yeah, this will work.
So, now, I think that I do not need to make a new parser for Zephir, as the PHP one works to locate Zephir symbols, at least for classes and methods which are the most useful symbols for me. Some work is certainly required for properties and variables, but I can live without for a while.
Maybe you use an earlier Geany version, but since 1.24 the PHP tag parser is a lot more clever, and also requires proper PHP open tags. With the "//<?php" trick it will of course work, but it won't without.
Regards, Colomban
Hi,
Le 15/05/2014 20:29, Colomban Wendling a écrit :
Hi,
Le 15/05/2014 17:17, Stéphane Mourey a écrit :
Well, thanks for your time. I may have look one day.
I created https://github.com/geany/geany/pull/270 which was fairly
I'll give it a try asap. Thanks for your work!
straightforward. It's not much tested as I don't know Zephir (yet?),
Zephir is really quickly learnt for a PHP coder : as the purpose is limited to extensions PHP coding through classes, the language is also limited in many ways, so there is not so much to learn. On the other side, thoses limitations are not a problem as you can use the PHP standard functions, and even those from others extensions if there are loaded. I suspect that you can use PHP functions and classes from the user space (coded in PHP), but I do not have try yet.
but should work fine. One limitation however is that it won't parse variables as it seems Zephir don't use $ mark, but that could probably be fixed relatively easily if knowing the language.
Meanwhile, the trick is to start with a commented PHP opening tag like this : // <?php
Yeah, this will work.
So, now, I think that I do not need to make a new parser for Zephir, as the PHP one works to locate Zephir symbols, at least for classes and methods which are the most useful symbols for me. Some work is certainly required for properties and variables, but I can live without for a while.
Maybe you use an earlier Geany version, but since 1.24 the PHP tag
Currently, I use 1.23.1... Have to update some stuff on this workstation!
parser is a lot more clever, and also requires proper PHP open tags. With the "//<?php" trick it will of course work, but it won't without.
Regards, Colomban _______________________________________________ Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users