diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2015-06-26 10:22:04 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2015-06-26 10:22:04 +0200 |
commit | c235ceb8ab03b125223fee01e1e38bc009095cf5 (patch) | |
tree | fb52f07c20c6de1f7ac92259b5c12fb3cf86e023 | |
parent | 56c71f10ad8c4585d624a4aefcca361bf1473b7e (diff) | |
parent | 4198e88fb08daf49eb32c6bcc3674cccfe659921 (diff) | |
download | Nim-c235ceb8ab03b125223fee01e1e38bc009095cf5.tar.gz |
Merge pull request #3000 from apense/patch-6
Clarified nnkFloat64Lit. Fixes #2939
-rw-r--r-- | doc/astspec.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/astspec.txt b/doc/astspec.txt index 72cd22cc6..c84fad8e8 100644 --- a/doc/astspec.txt +++ b/doc/astspec.txt @@ -51,7 +51,8 @@ a child can never be nil. Leaf nodes/Atoms ================ A leaf of the AST often corresponds to a terminal symbol in the concrete -syntax. +syntax. Note that the default ``float`` in Nim maps to ``float64`` such that +the default AST for a float is ``nnkFloat64Lit`` as below. ----------------- --------------------------------------------- Nim expression Corresponding AST @@ -65,7 +66,7 @@ Nim expression Corresponding AST ``42'u16`` ``nnkUInt16Lit(intVal = 42)`` ``42'u32`` ``nnkUInt32Lit(intVal = 42)`` ``42'u64`` ``nnkUInt64Lit(intVal = 42)`` -``42.0`` ``nnkFloatLit(floatVal = 42.0)`` +``42.0`` ``nnkFloat64Lit(floatVal = 42.0)`` ``42.0'f32`` ``nnkFloat32Lit(floatVal = 42.0)`` ``42.0'f64`` ``nnkFloat64Lit(floatVal = 42.0)`` ``"abc"`` ``nnkStrLit(strVal = "abc")`` |