An actual running implementation, which makes code that compiles.
[sod] / src / parser / scanner-proto.lisp
index 966c77c..a852bdb 100644 (file)
    The details of this structure are not a defined part of the token scanner
    protocol."
 
+  (scanner nil :type token-scanner :read-only t)
   (next nil :type (or token-scanner-place null))
   (type nil :read-only t)
   (value nil :read-only t)
    scanner protocol, which explains the model.
 
    Subclasses must provide the detailed scanning behaviour -- most notably
-   the `scanner-token' generic function.  This function should also update
-   the `line' and `column' slots to track the position in the underlying
-   source, if appropriate, and also implement a method on `file-location' to
-   return the location.  This class will handle the remaining details, such
-   as dealing correctly with rewinding."))
+   the `scanner-token' generic function -- and also implement a method on
+   `file-location' to return the location.  The `scanner-token' method should
+   also update the `line' and `column' slots to track the position in the
+   underlying source, if appropriate.  This class will handle the remaining
+   details, such as dealing correctly with rewinding."))
 
 (export 'token-scanner-context)
 (defclass token-scanner-context (scanner-context token-parser-context)