ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
with_gc
Last change
on this file since 641c3d0 was 6b0b624, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago |
change #ifndef to #pragma once
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[db175c8] | 1 | //
|
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
|
---|
| 3 | //
|
---|
| 4 | // The contents of this file are covered under the licence agreement in the
|
---|
| 5 | // file "LICENCE" distributed with Cforall.
|
---|
| 6 | //
|
---|
| 7 | // Declaration.h --
|
---|
| 8 | //
|
---|
| 9 | // Author : Richard C. Bilson
|
---|
| 10 | // Created On : Mon May 18 07:44:20 2015
|
---|
[44a81853] | 11 | // Last Modified By : Peter A. Buhr
|
---|
[6b0b624] | 12 | // Last Modified On : Sat Jul 22 09:54:14 2017
|
---|
| 13 | // Update Count : 39
|
---|
[db175c8] | 14 | //
|
---|
| 15 |
|
---|
[6b0b624] | 16 | #pragma once
|
---|
[db175c8] | 17 |
|
---|
| 18 | #include "SynTree.h"
|
---|
| 19 |
|
---|
| 20 | // GCC attribute
|
---|
[a436947] | 21 | // https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Attribute-Syntax.html#Attribute-Syntax
|
---|
[db175c8] | 22 | class Attribute {
|
---|
| 23 | public:
|
---|
[44a81853] | 24 | Attribute( std::string name = "", const std::list< Expression * > & parameters = std::list< Expression * >() ) : name( name ), parameters( parameters ) {}
|
---|
| 25 | Attribute( const Attribute &other );
|
---|
| 26 | virtual ~Attribute();
|
---|
[db175c8] | 27 |
|
---|
[44a81853] | 28 | std::string get_name() const { return name; }
|
---|
| 29 | void set_name( const std::string & newValue ) { name = newValue; }
|
---|
| 30 | std::list< Expression * > & get_parameters() { return parameters; }
|
---|
| 31 | bool empty() const { return name == ""; }
|
---|
[db175c8] | 32 |
|
---|
[44a81853] | 33 | Attribute * clone() const { return new Attribute( *this ); }
|
---|
| 34 | void print( std:: ostream &os, int indent = 0 ) const;
|
---|
[db175c8] | 35 | private:
|
---|
[44a81853] | 36 | std::string name;
|
---|
| 37 | // to keep things nice and tight, use NameExpr for special identifier parameters
|
---|
| 38 | std::list< Expression * > parameters;
|
---|
[db175c8] | 39 | };
|
---|
| 40 |
|
---|
[8ca3a72] | 41 | const std::list< Attribute * > noAttributes;
|
---|
| 42 |
|
---|
[44a81853] | 43 | // Local Variables: //
|
---|
| 44 | // tab-width: 4 //
|
---|
| 45 | // mode: c++ //
|
---|
| 46 | // compile-command: "make install" //
|
---|
| 47 | // End: //
|
---|
Note:
See
TracBrowser
for help on using the repository browser.