Tokens can't be imported #4

Closed
opened 7 years ago by glmdgrielson · 2 comments
glmdgrielson commented 7 years ago (Migrated from github.com)

I've found a bit of an issue in that the define-tokens syntax creates a reference to make-terminal-def
which for some reason doesn't get imported when I require the tokens. It's a confusing and unexpected error for a seemingly innocous action. What gives?

I've found a bit of an issue in that the `define-tokens` syntax creates a reference to `make-terminal-def` which for some reason doesn't get imported when I require the tokens. It's a confusing and unexpected error for a seemingly innocous action. What gives?
mbutterick commented 7 years ago (Migrated from github.com)

A code sample would be helpful. I haven’t run across this before.

On Jul 13, 2018, at 3:23 PM, glmdgrielson notifications@github.com wrote:

I've found a bit of an issue in that the define-tokens syntax creates a reference to make-terminal-def
which for some reason doesn't get imported when I require the tokens. It's a confusing and unexpected error for a seemingly innocous action. What gives?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

A code sample would be helpful. I haven’t run across this before. > On Jul 13, 2018, at 3:23 PM, glmdgrielson <notifications@github.com> wrote: > > I've found a bit of an issue in that the define-tokens syntax creates a reference to make-terminal-def > which for some reason doesn't get imported when I require the tokens. It's a confusing and unexpected error for a seemingly innocous action. What gives? > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub, or mute the thread.
glmdgrielson commented 7 years ago (Migrated from github.com)

Got it.

;;; tokens.rkt
(require br-parser-tools/lex)
(provide (all-defined-out))
(define-tokens attributes/t
  (shebang shebang-line
           inner-doc-comment
           outer-doc-comment))

and

;;; lex.rkt
(require "tokens.rkt")

I used to get an error saying make-terminal-def was not bound. It's stopped now. I'll close this then.

Got it. ```racket ;;; tokens.rkt (require br-parser-tools/lex) (provide (all-defined-out)) (define-tokens attributes/t (shebang shebang-line inner-doc-comment outer-doc-comment)) ``` and ```racket ;;; lex.rkt (require "tokens.rkt") ``` I **used** to get an error saying `make-terminal-def` was not bound. It's stopped now. I'll close this then.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/br-parser-tools#4
Loading…
There is no content yet.