diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-05-28 11:46:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 20:46:06 +0200 |
commit | e013ebc91a22eeccc9546498994b0c561e438599 (patch) | |
tree | f709d734bc62689a092f090ba7b36f58f22e0ea6 /compiler/ast.nim | |
parent | 17d08ff71cf8b071d33e66d865d28d8c0624f1f3 (diff) | |
download | Nim-e013ebc91a22eeccc9546498994b0c561e438599.tar.gz |
fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting; other bug fix (#14439)
* fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting * remove orig deadcode from getAllRunnableExamplesImpl * fix expected examples * add test to close https://github.com/nim-lang/Nim/issues/14473 * correctly handle regular comments before 1st token inside runnableExamples * add test to answer https://github.com/nim-lang/Nim/pull/14439#discussion_r431829199 * update tests
Diffstat (limited to 'compiler/ast.nim')
-rw-r--r-- | compiler/ast.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index 97aa3a992..d13487e9c 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -1030,6 +1030,7 @@ const nkFloatLiterals* = {nkFloatLit..nkFloat128Lit} nkLambdaKinds* = {nkLambda, nkDo} declarativeDefs* = {nkProcDef, nkFuncDef, nkMethodDef, nkIteratorDef, nkConverterDef} + routineDefs* = declarativeDefs + {nkMacroDef, nkTemplateDef} procDefs* = nkLambdaKinds + declarativeDefs nkSymChoices* = {nkClosedSymChoice, nkOpenSymChoice} |