Permalink
Browse files

fixed compilation on WP7

added missing nullables
  • Loading branch information...
1 parent 71527fd commit f8d01c46f567a55d01f10ff8b632fbc5a6571391 @paweljasinski paweljasinski committed May 13, 2012
Showing with 21 additions and 4 deletions.
  1. +21 −4 Languages/IronPython/IronPython/Modules/_ast.cs
View
25 Languages/IronPython/IronPython/Modules/_ast.cs 100644 → 100755
@@ -1,4 +1,4 @@
-/* ****************************************************************************
+/* ****************************************************************************
*
* Copyright (c) Jeff Hardy 2010.
* Copyright (c) Dan Eloff 2008-2009.
@@ -372,7 +372,6 @@ public abstract class AST
else
throw new ArgumentTypeException("Unexpected expression type: " + expr.GetType());
- // TODO: DictComp and SetComp throws here
ast.GetSourceLocation(expr);
return ast;
}
@@ -1031,7 +1030,10 @@ public class Break : stmt
{
internal static Break Instance = new Break();
- public Break([Optional]int lineno, [Optional]int col_offset) {
+ internal Break()
+ : this(null, null) { }
+
+ public Break([Optional]int? lineno, [Optional]int? col_offset) {
_lineno = lineno;
_col_offset = col_offset;
}
@@ -1220,6 +1222,9 @@ public class Continue : stmt
{
internal static Continue Instance = new Continue();
+ internal Continue()
+ : this(null, null) { }
+
public Continue([Optional]int? lineno, [Optional]int? col_offset) {
_lineno = lineno;
_col_offset = col_offset;
@@ -2200,6 +2205,9 @@ public Name(string id, expr_context ctx, [Optional]int? lineno, [Optional]int? c
_col_offset = col_offset;
}
+ public Name(String id, expr_context ctx)
+ : this(id, ctx, null, null) { }
+
internal Name(NameExpression expr, expr_context ctx)
: this(expr.Name, ctx) {
}
@@ -2242,6 +2250,9 @@ public class Num : expr
_fields = new PythonTuple(new[] { "n", });
}
+ internal Num(object n)
+ : this(n, null, null) { }
+
public Num(object n, [Optional]int? lineno, [Optional]int? col_offset)
: this() {
_n = n;
@@ -2272,7 +2283,10 @@ public class Pass : stmt
{
internal static Pass Instance = new Pass();
- public Pass([Optional]int lineno, [Optional]int col_offset) {
+ internal Pass()
+ : this(null, null) { }
+
+ public Pass([Optional]int? lineno, [Optional]int? col_offset) {
_lineno = lineno;
_col_offset = col_offset;
}
@@ -2574,6 +2588,9 @@ public class Str : expr
_fields = new PythonTuple(new[] { "s", });
}
+ internal Str(String s)
+ : this(s, null, null) { }
+
public Str(string s, [Optional]int? lineno, [Optional]int? col_offset)
: this() {
_s = s;

0 comments on commit f8d01c4

Please sign in to comment.