akeep / nanopass-framework-racket

Racket port of the nanopass-framework
MIT License
34 stars 9 forks source link

Errors from with-output-language #38

Open soegaard opened 9 years ago

soegaard commented 9 years ago

Here are two examples of problematic errors from with-output-language:

#lang nanopass
(define-language L
  (entry Expr)
  (terminals
   (symbol (s)))
  (Expr (e) s))

(with-output-language (L Foo)
  `,3)

This first example gives there error

Dropbox/GitHub/nanopass-framework-racket/private/meta-parser.rkt:361:4: L: unrecognized nonterminal passed to meta parser Foo

But the error location is missing (Foo is not colored red).

The next example shows a missing error:

#lang nanopass
(define-language L
  (entry Expr)
  (terminals
   (symbol (s)))
  (Expr (e) s))
  (with-output-language (L Foo)
    3)

Compiles without errors. I expected to get the error: "Foo is not a nonterminal in L"