mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 19:19:53 +00:00
Merge pull request #707 from pepe/fix-shadow
Rename level const to not to shadow line in eval1
This commit is contained in:
commit
8b97a0dbbf
@ -2231,12 +2231,12 @@
|
|||||||
(def lint-error (or (get lint-levels lint-error lint-error) 0))
|
(def lint-error (or (get lint-levels lint-error lint-error) 0))
|
||||||
(def lint-warning (or (get lint-levels lint-warning lint-warning) 2))
|
(def lint-warning (or (get lint-levels lint-warning lint-warning) 2))
|
||||||
(each [level line col msg] lints
|
(each [level line col msg] lints
|
||||||
(def l (get lint-levels level 0))
|
(def lvl (get lint-levels level 0))
|
||||||
(cond
|
(cond
|
||||||
(<= l lint-error) (do
|
(<= lvl lint-error) (do
|
||||||
(set good false)
|
(set good false)
|
||||||
(on-compile-error msg nil where (or line l) (or col c)))
|
(on-compile-error msg nil where (or line l) (or col c)))
|
||||||
(<= l lint-warning) (on-compile-warning msg level where (or line l) (or col c)))))
|
(<= lvl lint-warning) (on-compile-warning msg level where (or line l) (or col c)))))
|
||||||
(when good
|
(when good
|
||||||
(if (= (type res) :function)
|
(if (= (type res) :function)
|
||||||
(evaluator res source env where)
|
(evaluator res source env where)
|
||||||
|
Loading…
Reference in New Issue
Block a user