summaryrefslogtreecommitdiff
path: root/Source/Dafny/Cloner.cs
diff options
context:
space:
mode:
authorGravatar leino <unknown>2014-10-20 18:42:33 -0700
committerGravatar leino <unknown>2014-10-20 18:42:33 -0700
commitc182b533a83dfee69828620f12a051feaab03eac (patch)
tree6223081d1ca9009afb83f0ff44758a196f9cfce9 /Source/Dafny/Cloner.cs
parent12242050fe7069f7dcf4e99f23b14f447e6b55e0 (diff)
Add char literals.
Disallow backslash from being part of identifier names.
Diffstat (limited to 'Source/Dafny/Cloner.cs')
-rw-r--r--Source/Dafny/Cloner.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Dafny/Cloner.cs b/Source/Dafny/Cloner.cs
index 75c6ddfe..84066c0e 100644
--- a/Source/Dafny/Cloner.cs
+++ b/Source/Dafny/Cloner.cs
@@ -249,7 +249,9 @@ namespace Microsoft.Dafny
return new LiteralExpr(Tok(e.tok));
} else if (e.Value is bool) {
return new LiteralExpr(Tok(e.tok), (bool)e.Value);
- } else if (e.Value is string) {
+ } else if (e is CharLiteralExpr) {
+ return new CharLiteralExpr(Tok(e.tok), (string)e.Value);
+ } else if (e is StringLiteralExpr) {
var str = (StringLiteralExpr)e;
return new StringLiteralExpr(Tok(e.tok), (string)e.Value, str.IsVerbatim);
} else if (e.Value is Basetypes.BigDec) {