Last active
August 29, 2015 13:59
-
-
Save dinedal/10561601 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/ooc/ooc-phenom(master ✗) rock --allerrors -v -r --gc=off -O3 samples/strings.ooc | |
Parsing... | |
Resolving... | |
Generating C sources... | |
Compiling with 8 threads... | |
sdk, phenom, samples/strings, | |
Compiling 1 modules | |
[CC] samples/strings | |
/Users/paul/ooc/ooc-phenom/samples/strings.ooc:10:9: error: pasting formed '_str_buf_static_(', an invalid preprocessing token | |
phenom_Phenom__PH_STRING_DECLARE_STACK((void*) lang_String__makeStringLiteral("str", 3), 128); | |
^ | |
.libs/ooc/phenom/phenom/Phenom-fwd.h:39:48: note: expanded from macro 'phenom_Phenom__PH_STRING_DECLARE_STACK' | |
#define phenom_Phenom__PH_STRING_DECLARE_STACK PH_STRING_DECLARE_STACK | |
^ | |
/usr/local/include/phenom/string.h:176:24: note: expanded from macro 'PH_STRING_DECLARE_STACK' | |
char _str_buf_static_##name[size]; \ | |
^ | |
/Users/paul/ooc/ooc-phenom/samples/strings.ooc:10:56: error: expected ';' at end of declaration | |
phenom_Phenom__PH_STRING_DECLARE_STACK((void*) lang_String__makeStringLiteral("str", 3), 128); | |
^ | |
/usr/local/include/phenom/string.h:176:26: note: expanded from macro 'PH_STRING_DECLARE_STACK' | |
char _str_buf_static_##name[size]; \ | |
^ | |
/Users/paul/ooc/ooc-phenom/samples/strings.ooc:10:49: error: expected identifier or '(' | |
phenom_Phenom__PH_STRING_DECLARE_STACK((void*) lang_String__makeStringLiteral("str", 3), 128); | |
^ | |
/usr/local/include/phenom/string.h:177:15: note: expanded from macro 'PH_STRING_DECLARE_STACK' | |
ph_string_t name = { 1, PH_STRING_STATIC, 0, size, \ | |
^ | |
/Users/paul/ooc/ooc-phenom/samples/strings.ooc:10:49: error: expected ')' | |
/usr/local/include/phenom/string.h:177:15: note: expanded from macro 'PH_STRING_DECLARE_STACK' | |
ph_string_t name = { 1, PH_STRING_STATIC, 0, size, \ | |
^ | |
/Users/paul/ooc/ooc-phenom/samples/strings.ooc:10:48: note: to match this '(' | |
phenom_Phenom__PH_STRING_DECLARE_STACK((void*) lang_String__makeStringLiteral("str", 3), 128); | |
^ | |
/usr/local/include/phenom/string.h:177:15: note: expanded from macro 'PH_STRING_DECLARE_STACK' | |
ph_string_t name = { 1, PH_STRING_STATIC, 0, size, \ | |
^ | |
/Users/paul/ooc/ooc-phenom/samples/strings.ooc:10:9: error: pasting formed '_str_buf_static_(', an invalid preprocessing token | |
phenom_Phenom__PH_STRING_DECLARE_STACK((void*) lang_String__makeStringLiteral("str", 3), 128); | |
^ | |
.libs/ooc/phenom/phenom/Phenom-fwd.h:39:48: note: expanded from macro 'phenom_Phenom__PH_STRING_DECLARE_STACK' | |
#define phenom_Phenom__PH_STRING_DECLARE_STACK PH_STRING_DECLARE_STACK | |
^ | |
/usr/local/include/phenom/string.h:178:21: note: expanded from macro 'PH_STRING_DECLARE_STACK' | |
_str_buf_static_##name, 0, true } | |
^ | |
5 errors generated. | |
C compiler failed (got code 1), aborting compilation process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use phenom | |
include phenom/defs, phenom/configuration, phenom/job, phenom/log, phenom/sysutil | |
ph_library_init:extern func() | |
ph_nbio_init:extern func(Int) | |
ph_sched_run:extern func() | |
/* Strings */ | |
PH_STRING_DECLARE_STACK: extern func(name: String, size: Int) | |
PHString:extern cover from struct ph_string | |
/* PHStackString: cover from PHString* extends PHString { */ | |
/* new: static func (size: Int) -> This { */ | |
/* PH_STRING_DECLARE_STACK("test", size) */ | |
/* } */ | |
/* } */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use phenom | |
import phenom/Phenom | |
ph_library_init() | |
ph_nbio_init(0) | |
//ph_sched_run() | |
//str := PHStackString | |
PH_STRING_DECLARE_STACK("str", 128) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment