Permalink
Browse files

Fix some issues in FalconJS

  • Loading branch information...
1 parent 9118470 commit 5a049b0cd3208004fb8b846286a46bf5f4816daa @aharui aharui committed Mar 21, 2013
View
@@ -25,9 +25,9 @@
# In Windows Command Prompt, use mxmlc.bat instead.
#
+SCRIPT_HOME=`dirname $0`
if [ "x${FALCON_HOME}" = "x" ]
then
- SCRIPT_HOME=`dirname $0`
FALCON_HOME=${SCRIPT_HOME}/../../compiler
fi
@@ -6160,6 +6160,22 @@ public String transform_string_constant(IASNode iNode, String string_constant)
*/
// expression = string_constant
+ // (AJH) sometimes folded constants don't have quotes.
+ // Probably should be fixed somewhere else but hacking
+ // a solution here for now
+ if (string_constant.length() == 0)
+ {
+ string_constant = "";
+ }
+ else
+ {
+ char firstChar = string_constant.charAt(0);
+ if (firstChar != '\"' && firstChar != '\'')
+ {
+ // missing quotes, add them
+ string_constant = "\"" + string_constant + "\"";
+ }
+ }
result += string_constant;
return result;
@@ -262,6 +262,8 @@ else if (path.indexOf(outputFolderPath) == 0)
{
path = path.replace(outputFolderPath, "");
}
+ // paths are actually URIs and always have forward slashes
+ path = path.replace('\\', '/');
return ".." + path;
}
private class GoogDep

0 comments on commit 5a049b0

Please sign in to comment.