Last change
on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
393 bytes
|
Line | |
---|
1 | var utils = require('../utils')
|
---|
2 | , nodes = require('../nodes');
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * Lookup variable `name` or return Null.
|
---|
6 | *
|
---|
7 | * @param {String} name
|
---|
8 | * @return {Mixed}
|
---|
9 | * @api public
|
---|
10 | */
|
---|
11 |
|
---|
12 | function lookup(name){
|
---|
13 | utils.assertType(name, 'string', 'name');
|
---|
14 | var node = this.lookup(name.val);
|
---|
15 | if (!node) return nodes.null;
|
---|
16 | return this.visit(node);
|
---|
17 | }
|
---|
18 | lookup.params = ['name'];
|
---|
19 | module.exports = lookup;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.