1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

whitespace changes

* module/language/elisp/bindings.scm:
* module/language/elisp/compile-tree-il.scm:
* module/language/elisp/lexer.scm:
* module/language/elisp/parser.scm:
* module/language/elisp/runtime.scm:
* module/language/elisp/runtime/function-slot.scm:
* module/language/elisp/runtime/macro-slot.scm: Ensure that all
  top-level forms and comments are separated by exactly one newline.
  Remove blank lines in most procedure bodies. Delete trailing
  whitespace.

Signed-off-by: Andy Wingo <wingo@pobox.com>
This commit is contained in:
Brian Templeton 2010-06-07 16:37:24 -04:00 committed by Andy Wingo
parent 9c933e1d3f
commit abcf4a9e1d
8 changed files with 75 additions and 119 deletions

View file

@ -28,14 +28,12 @@
; lexer ((text parse-lalr) seems not to allow access to the original lexer
; token-pair) and is easy enough anyways.
; Report a parse error. The first argument is some current lexer token
; where source information is available should it be useful.
(define (parse-error token msg . args)
(apply error msg args))
; For parsing circular structures, we keep track of definitions in a
; hash-map that maps the id's to their values.
; When defining a new id, though, we immediatly fill the slot with a promise
@ -64,6 +62,7 @@
; Returned is a closure that, when invoked, will set the final value.
; This means both the variable the promise will return and the hash-table
; slot so we don't generate promises any longer.
(define (circular-define! token)
(if (not (eq? (car token) 'circular-def))
(error "invalid token for circular-define!" token))
@ -80,6 +79,7 @@
; this may lead to infinite recursion with a circular structure, and
; additionally this value was already processed when it was defined.
; All deep data structures that can be parsed must be handled here!
(define (force-promises! data)
(cond
((pair? data)
@ -102,7 +102,6 @@
; Else nothing needs to be done.
))
; We need peek-functionality for the next lexer token, this is done with some
; single token look-ahead storage. This is handled by a closure which allows
; getting or peeking the next token.
@ -128,7 +127,6 @@
result))
(else (error "invalid lexer-buffer action" action))))))))
; Get the contents of a list, where the opening parentheses has already been
; found. The same code is used for vectors and lists, where lists allow the
; dotted tail syntax and vectors not; additionally, the closing parenthesis
@ -159,8 +157,6 @@
(tail (get-list lex allow-dot close-square)))
(cons head tail))))))
; Parse a single expression from a lexer-buffer. This is the main routine in
; our recursive-descent parser.
@ -197,7 +193,6 @@
(else
(parse-error token "expected expression, got" token)))))
; Define the reader function based on this; build a lexer, a lexer-buffer,
; and then parse a single expression to return.
; We also define a circular-definitions data structure to use.