Commit Graph

3 Commits

Author SHA1 Message Date
Peace-Maker
7868767dde Add string literal concatenation using ellipses "..." (bug 4261, PR #5)
commit cd0d31805c
Author: Peace-Maker <peace-maker@wcfan.de>
Date:   Wed May 28 03:07:25 2014 +0200

    Ignore \ ctrlchar in lexing

commit cf617a4d20
Author: Peace-Maker <peace-maker@wcfan.de>
Date:   Tue May 27 13:32:59 2014 +0200

    Add string literal concatenation using ellipses "..." (bug 4261)

    Backported the changes CompuPhase did to the compiler to support string
    literal concatenation including all fixes in later commits from r30 on.
    http://code.google.com/p/pawnscript/source/detail?r=30

    Pawn uses ellipses "..." to concatenate so it looks like this:

    #define PROJECT_AUTHOR "Greyscale"
    #define PROJECT_COPYRIGHT "Copyright (C) 2010  " ... PROJECT_AUTHOR

    This would result in PROJECT_COPYRIGHT being defined as
    "Copyright (C) 2010  Greyscale"

    While i've been at it, that stringizing a macro parameter feature was
    ported too.
    From the changelog for version 3.3.4026
    (http://www.compuphase.com/pawn/pawnhistory.htm):

    The macro substition processor now recognizes the "#" character for
    "stringizing" a parameter. For example, if you have the definition
    #define log(%1) #%1
    Then the expression log(test) will result in "test".
    Note that concatenation of literal strings requires an ellipsis in pawn
    (which is different than C/C++). So to combine the parameter with
    literal strings, use a syntax like:
    #define log(%1) "logging: " ... #%1 ... "\n"
    The stringize operator is only available in the replacement text of a
    macro.

    Doing
    PrintToServer(log(hello));
    would print
    logging: hello\n
2014-05-27 19:30:13 -07:00
Kyle Sanderson
29bc273e58 Removed -Wno-parentheses from posix build and fixed warnings (bug 5745, r=psychonic). 2013-07-18 15:50:57 -04:00
Scott Ehlert
251cced1f8 Spring Cleaning, Part Ichi (1)
Various minor things done to project files
Updated sample extension project file and updated makefile to the new unified version (more changes likely on the way)
Updated regex project file and makefile

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401971
2008-03-30 07:00:22 +00:00