Compare commits
3 Commits
66d26ea25d
...
f49077de7f
Author | SHA1 | Date | |
---|---|---|---|
|
f49077de7f | ||
|
a111989860 | ||
|
36bf1902ff |
@ -265,7 +265,7 @@ char *parse_lex (void) {
|
|||||||
parse.lex.type = lex_lc_ident;
|
parse.lex.type = lex_lc_ident;
|
||||||
return (parse.lex.ptr = p);
|
return (parse.lex.ptr = p);
|
||||||
}
|
}
|
||||||
if (curch == '.') {
|
while (curch == '.') {
|
||||||
parse.lex.flags |= 1;
|
parse.lex.flags |= 1;
|
||||||
nextch ();
|
nextch ();
|
||||||
if (is_uletter (curch)) {
|
if (is_uletter (curch)) {
|
||||||
@ -2445,6 +2445,8 @@ int tl_parse_builtin_combinator_decl (struct tree *T, int fun) {
|
|||||||
if ((!mystrcmp2 (T->c[0]->text, T->c[0]->len, "int") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "Int")) ||
|
if ((!mystrcmp2 (T->c[0]->text, T->c[0]->len, "int") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "Int")) ||
|
||||||
(!mystrcmp2 (T->c[0]->text, T->c[0]->len, "long") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "Long")) ||
|
(!mystrcmp2 (T->c[0]->text, T->c[0]->len, "long") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "Long")) ||
|
||||||
(!mystrcmp2 (T->c[0]->text, T->c[0]->len, "double") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "Double")) ||
|
(!mystrcmp2 (T->c[0]->text, T->c[0]->len, "double") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "Double")) ||
|
||||||
|
(!mystrcmp2 (T->c[0]->text, T->c[0]->len, "object") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "Object")) ||
|
||||||
|
(!mystrcmp2 (T->c[0]->text, T->c[0]->len, "function") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "Function")) ||
|
||||||
(!mystrcmp2 (T->c[0]->text, T->c[0]->len, "string") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "String"))) {
|
(!mystrcmp2 (T->c[0]->text, T->c[0]->len, "string") && !mystrcmp2 (T->c[1]->text, T->c[1]->len, "String"))) {
|
||||||
struct tl_type *t = tl_add_type (T->c[1]->text, T->c[1]->len, 0, 0);
|
struct tl_type *t = tl_add_type (T->c[1]->text, T->c[1]->len, 0, 0);
|
||||||
if (!t) {
|
if (!t) {
|
||||||
@ -2951,7 +2953,8 @@ void write_type (struct tl_type *t) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int is_builtin_type (const char *id) {
|
int is_builtin_type (const char *id) {
|
||||||
return !strcmp (id, "int") || !strcmp (id, "long") || !strcmp (id, "double") || !strcmp (id, "string");
|
return !strcmp (id, "int") || !strcmp (id, "long") || !strcmp (id, "double") || !strcmp (id, "string")
|
||||||
|
|| !strcmp(id, "object") || !strcmp(id, "function");
|
||||||
}
|
}
|
||||||
|
|
||||||
void write_combinator (struct tl_constructor *c) {
|
void write_combinator (struct tl_constructor *c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user