fix wrong name (rnimsyn => renderer; pnimsyn => parser; scanner => lexer) (#18895)

* fix wrong module name

* rephrase more word
This commit is contained in:
flywind
2021-09-25 19:22:00 +08:00
committed by GitHub
parent 4adada0d80
commit 8bdb985395
5 changed files with 7 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ type
info: TLineInfo
indent, emitPar: int
x: string # the current input line
outp: PLLStream # the output will be parsed by pnimsyn
outp: PLLStream # the output will be parsed by parser
subsChar, nimDirective: char
emit, conc, toStr: string
curly, bracket, par: int

View File

@@ -7,12 +7,12 @@
# distribution, for details about the copyright.
#
# This scanner is handwritten for efficiency. I used an elegant buffering
# This lexer is handwritten for efficiency. I used an elegant buffering
# scheme which I have not seen anywhere else:
# We guarantee that a whole line is in the buffer. Thus only when scanning
# the \n or \r character we have to check whether we need to read in the next
# chunk. (\n or \r already need special handling for incrementing the line
# counter; choosing both \n and \r allows the scanner to properly read Unix,
# counter; choosing both \n and \r allows the lexer to properly read Unix,
# DOS or Macintosh text files, even when it is not the native format.
import

View File

@@ -14,7 +14,7 @@ import
options, idents, wordrecg, strtabs, lineinfos, pathutils, scriptconfig
# ---------------- configuration file parser -----------------------------
# we use Nim's scanner here to save space and work
# we use Nim's lexer here to save space and work
proc ppGetTok(L: var Lexer, tok: var Token) =
# simple filter

View File

@@ -410,7 +410,7 @@ proc atom(g: TSrcGen; n: PNode): string =
if (n.typ != nil) and (n.typ.sym != nil): result = n.typ.sym.name.s
else: result = "[type node]"
else:
internalError(g.config, "rnimsyn.atom " & $n.kind)
internalError(g.config, "renderer.atom " & $n.kind)
result = ""
proc lcomma(g: TSrcGen; n: PNode, start: int = 0, theEnd: int = - 1): int =
@@ -1699,7 +1699,7 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext, fromStmtList = false) =
gsub(g, n[0], c)
else:
#nkNone, nkExplicitTypeListCall:
internalError(g.config, n.info, "rnimsyn.gsub(" & $n.kind & ')')
internalError(g.config, n.info, "renderer.gsub(" & $n.kind & ')')
proc renderTree*(n: PNode, renderFlags: TRenderFlags = {}): string =
if n == nil: return "<nil tree>"

View File

@@ -216,7 +216,7 @@ comment:
.. code-block:: nim
i = 0 # This is a single comment over multiple lines.
# The scanner merges these two pieces.
# The lexer merges these two pieces.
# The comment continues here.