summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2019-10-04 21:43:47 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-10-04 22:43:47 +0200
commita03d8ed4c20b3ee2ae40b1c547cfbdb8738c27b5 (patch)
tree44dece66ff99b8c85cce836c2eba2f99a8a9f949 /compiler
parent26676066cc4945841c9ad08e7385b1eb5578b72d (diff)
downloadNim-a03d8ed4c20b3ee2ae40b1c547cfbdb8738c27b5.tar.gz
Expose some layouter elements, improve readme (#12361)
Useful for writing linters and static code analysis
Diffstat (limited to 'compiler')
-rw-r--r--compiler/layouter.nim6
-rw-r--r--compiler/readme.txt1
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/layouter.nim b/compiler/layouter.nim
index 7c1c9d16c..a8e31ae69 100644
--- a/compiler/layouter.nim
+++ b/compiler/layouter.nim
@@ -21,7 +21,7 @@ type
   SemicolonKind = enum
     detectSemicolonKind, useSemicolon, dontTouch
 
-  LayoutToken = enum
+  LayoutToken* = enum
     ltSpaces,
     ltCrucialNewline, ## a semantically crucial newline (indentation!)
     ltSplittingNewline, ## newline used for splitting up long
@@ -41,8 +41,8 @@ type
     col, lastLineNumber, lineSpan, indentLevel, indWidth*, inSection: int
     keepIndents*: int
     doIndentMore*: int
-    kinds: seq[LayoutToken]
-    tokens: seq[string]
+    kinds*: seq[LayoutToken]
+    tokens*: seq[string]
     indentStack: seq[int]
     fixedUntil: int # marks where we must not go in the content
     altSplitPos: array[SplitKind, int] # alternative split positions
diff --git a/compiler/readme.txt b/compiler/readme.txt
index c4934e031..ccfad7748 100644
--- a/compiler/readme.txt
+++ b/compiler/readme.txt
@@ -2,3 +2,4 @@ This directory contains the Nim compiler written in Nim. Note that this
 code has been translated from a bootstrapping version written in Pascal, so
 the code is **not** a poster child of good Nim code.
 
+See https://nim-lang.org/docs/intern.html for more information.