chiark
/
gitweb
/
~mdw
/
sod
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/c-types-proto.lisp: Fix docstring.
[sod]
/
src
/
parser
/
scanner-proto.lisp
diff --git
a/src/parser/scanner-proto.lisp
b/src/parser/scanner-proto.lisp
index d590d77b4a6f94edc04b364965c982a621039691..bd7e160c72444dea97ed68dc2287cd3e83038eea 100644
(file)
--- a/
src/parser/scanner-proto.lisp
+++ b/
src/parser/scanner-proto.lisp
@@
-176,7
+176,7
@@
(defun scanner-file-location (scanner)
(export '(token-scanner token-type token-value))
(defclass token-scanner ()
(export '(token-scanner token-type token-value))
(defclass token-scanner ()
- ((type :reader token-type)
+ ((
%
type :reader token-type)
(value :reader token-value)
(captures :initform 0 :type fixnum)
(tail :initform nil :type (or token-scanner-place null))
(value :reader token-value)
(captures :initform 0 :type fixnum)
(tail :initform nil :type (or token-scanner-place null))
@@
-206,7
+206,10
@@
(defclass token-scanner-context (scanner-context token-parser-context)
;; A place marker.
(export '(token-scanner-place token-scanner-place-p))
;; A place marker.
(export '(token-scanner-place token-scanner-place-p))
-(defstruct token-scanner-place
+(defstruct (token-scanner-place
+ (:constructor make-token-scanner-place
+ (&key scanner next type value line column
+ &aux (%type type))))
"A link in the chain of lookahead tokens; capturable as a place.
If the scanner's place is captured, it starts to maintain a list of
"A link in the chain of lookahead tokens; capturable as a place.
If the scanner's place is captured, it starts to maintain a list of
@@
-220,10
+223,12
@@
(defstruct token-scanner-place
(scanner nil :type token-scanner :read-only t)
(next nil :type (or token-scanner-place null))
(scanner nil :type token-scanner :read-only t)
(next nil :type (or token-scanner-place null))
- (type nil :read-only t)
+ (
%
type nil :read-only t)
(value nil :read-only t)
(line 1 :type (or fixnum null) :read-only t)
(column 0 :type (or fixnum null) :read-only t))
(value nil :read-only t)
(line 1 :type (or fixnum null) :read-only t)
(column 0 :type (or fixnum null) :read-only t))
+(define-access-wrapper token-scanner-place-type token-scanner-place-%type
+ :read-only t)
;; Protocol.
;; Protocol.