Closed xPaw closed 9 years ago
Agreed, a pretty simple change: https://github.com/50Wliu/language-sourcepawn/blob/master/grammars/sourcepawn.cson#L3-L6
Just curious though, what's the main differences between AMXX and SM? If there's more than a few I could add a separate .cson file for it and change the scope name, etc (like language-c does).
It should work fine without any changes.
@50Wliu I believe(not 100% sure) Sourcepawn evolved from AMXX's Pawn(my reasoning is from SourcePawn has commit messages/stuff that are AMXX based).
Edit: Ya, sourcepawn's compiler has a file named: amx.h
That is true
@xPaw Is AMXX's string escape character different, I can't remember 100% for sure but I believe I read somewhere it's '^' instead of '\'?
By default yes, but it's changeable via #pragma, iirc.
On Mon, 4 May 2015 02:45 WildCard65 notifications@github.com wrote:
@xPaw https://github.com/xPaw Is AMXX's string escape character different, I can't remember 100% for sure but I believe I read somewhere it's '^' instead of '\'?
— Reply to this email directly or view it on GitHub https://github.com/50Wliu/language-sourcepawn/issues/2#issuecomment-98557589 .
@xPaw @50Wliu The only thing that may be confusing for AMXX coders if this repo does adapt to support AMXX is the SM 1.7 syntax keywords(int, void, etc)
Is it alright if I drag @SmileYzn to this?
Just dropping in here to say that I haven't forgotten about this; I've just been really busy lately with a different project.
Ok. If I do add support for .sma
, one of two things will happen.
Scenario 1: I simply add .sma
under the supported filetypes list, which will properly highlight .sma
files, but their tokens will all still be *.sp
(eg constant.numeric.sp
).
Scenario 2: I add a different .cson
file named amxxpawn.cson
or something and copy/paste everything from sourcepawn.cson
into it but find+replace .sp
-->.sma
, which isn't that much better than what @SmileYzn is doing right now.
Thoughts?
@50Wliu, if atom supports templates, y not make one for the common stuff between amxx pawn and sourcepawn? If not, try to get that into atom then work from there for SP and SMA
On Mon, Jun 1, 2015 at 8:27 PM, Wliu notifications@github.com wrote:
Ok. If I do add support for .sma, one of two things will happen. Scenario 1: I simply add .sma under the supported filetypes list, which will properly highlight .sma files, but their tokens will all still be *.sp (eg constant.numeric.sp). Scenario 2: I add a different .cson file named amxxpawn.cson or something and copy/paste everything from sourcepawn.cson into it but find+replace .sp-->.sma, which isn't that much better than what @SmileYzn https://github.com/SmileYzn is doing right now.
Thoughts?
— Reply to this email directly or view it on GitHub https://github.com/50Wliu/language-sourcepawn/issues/2#issuecomment-107752543 .
I don't think .sp
is such a big deal to be worried about.
AMXX users will have to deal with \
escape characters and new-style syntax tokenization for now.
This guy forked your repository to add amxx support, but there's no real reason for it to be a separate package: https://forums.alliedmods.net/showthread.php?t=262349
Should be as simple as adding an alias for
.sma
->.sp