Skip to content
Newer
Older
100644 59 lines (49 sloc) 1.4 KB
3f2fa29 @steveicarus Factor compile-time scopes into PScope class
authored Feb 13, 2008
1 /*
b4f070e @martinwhitaker Rework of lexical scope handling in parser.
martinwhitaker authored Jan 8, 2010
2 * Copyright (c) 2008,2010 Stephen Williams (steve@icarus.com)
3f2fa29 @steveicarus Factor compile-time scopes into PScope class
authored Feb 14, 2008
3 *
4 * This source code is free software; you can redistribute it
5 * and/or modify it in source code form under the terms of the GNU
6 * General Public License as published by the Free Software
7 * Foundation; either version 2 of the License, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
f5aafc3 @arunpersaud updated FSF-address
arunpersaud authored Aug 28, 2012
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3f2fa29 @steveicarus Factor compile-time scopes into PScope class
authored Feb 14, 2008
18 */
19
20 # include "PScope.h"
21
b4f070e @martinwhitaker Rework of lexical scope handling in parser.
martinwhitaker authored Jan 8, 2010
22 PScope::PScope(perm_string n, LexicalScope*parent)
23 : LexicalScope(parent), name_(n)
15481a9 @steveicarus Elaborate block scopes burried in generate schemes.
authored Jun 17, 2008
24 {
25 }
26
27 PScope::PScope(perm_string n)
b4f070e @martinwhitaker Rework of lexical scope handling in parser.
martinwhitaker authored Jan 8, 2010
28 : LexicalScope(0), name_(n)
3f2fa29 @steveicarus Factor compile-time scopes into PScope class
authored Feb 14, 2008
29 {
30 }
31
32 PScope::~PScope()
33 {
34 }
8e704cb @steveicarus Rework handling of lexical scope
authored Feb 24, 2008
35
c87e629 @steveicarus Better handle nesting of scopes inside generate blocks.
authored Jun 19, 2008
36 PWire* LexicalScope::wires_find(perm_string name)
8e704cb @steveicarus Rework handling of lexical scope
authored Feb 25, 2008
37 {
38 map<perm_string,PWire*>::const_iterator cur = wires.find(name);
39 if (cur == wires.end())
40 return 0;
41 else
42 return (*cur).second;
43 }
b0d6181 @steveicarus Get the scope of class methods right
authored Mar 11, 2012
44
45 PScopeExtra::PScopeExtra(perm_string n, LexicalScope*parent)
46 : PScope(n, parent)
47 {
48 }
49
50 PScopeExtra::PScopeExtra(perm_string n)
51 : PScope(n)
52 {
53 }
54
55 PScopeExtra::~PScopeExtra()
56 {
57 }
58
Something went wrong with that request. Please try again.