Skip to content

Commit

Permalink
* token strings are being prefixed by __reserved_ when written to gen…
Browse files Browse the repository at this point in the history
…erated code buffer

* fixed arrays with unspecified size not being recognized as variables with pointer/array type. Now their type is an instance of pointer_type (array_type only adds known size and index range checks when enabled)
  • Loading branch information
zuzuf committed Aug 15, 2014
1 parent ebabbf0 commit 0d55311
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/parser/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ namespace FreeOCL
ERROR(msg);
}
}
else // Array with unspecified size
l_type = new pointer_type(l_type, l_type->is_const(), l_type->get_address_space());
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/parser/token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ namespace FreeOCL
out << std::endl;
case ';':
case ':':
out << str << std::endl;
out << wrap_reserved(str) << std::endl;
break;
default:
out << str << ' ';
out << wrap_reserved(str) << ' ';
}
}

Expand All @@ -33,8 +33,8 @@ namespace FreeOCL
return false;
}

const char *token::get_node_type() const
{
return "token";
}
const char *token::get_node_type() const
{
return "token";
}
}

0 comments on commit 0d55311

Please sign in to comment.