-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Starting work on a value type reps an item indexed out of a list.
- Loading branch information
Showing
5 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Idexed.cpp | ||
* | ||
* Created on: Sep 7, 2013 | ||
* Author: jimtahu | ||
*/ | ||
|
||
#include "IdexedValue.h" | ||
|
||
namespace ParseTree { | ||
|
||
IdexedValue::IdexedValue(Identifier *name, Value *index) | ||
{ | ||
this->name = name; | ||
this->index = index; | ||
} | ||
|
||
std::string IdexedValue::getValue() | ||
{ | ||
return "indexed thingy"; | ||
} | ||
|
||
unsigned int IdexedValue::getIndex() | ||
{ | ||
return 0; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Idexed.h | ||
* | ||
* Created on: Sep 7, 2013 | ||
* Author: jimtahu | ||
*/ | ||
|
||
#ifndef IDEXED_H_ | ||
#define IDEXED_H_ | ||
|
||
#include "Identifier.h" | ||
|
||
namespace ParseTree { | ||
|
||
class IdexedValue: public ParseTree::Value { | ||
Identifier *name; | ||
Value *index; | ||
public: | ||
IdexedValue(Identifier *name, Value *index); | ||
virtual std::string getValue(); | ||
virtual unsigned int getIndex(); | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters