forked from jasder/antlr
commit
ce09abb480
|
@ -136,3 +136,5 @@ YYYY/MM/DD, github id, Full name, email
|
||||||
2017/02/10, lionelplessis, Lionel Plessis, lionelplessis@users.noreply.github.com
|
2017/02/10, lionelplessis, Lionel Plessis, lionelplessis@users.noreply.github.com
|
||||||
2017/02/14, lecode-official, David Neumann, david.neumann@lecode.de
|
2017/02/14, lecode-official, David Neumann, david.neumann@lecode.de
|
||||||
2017/02/14, xied75, Dong Xie, xied75@gmail.com
|
2017/02/14, xied75, Dong Xie, xied75@gmail.com
|
||||||
|
2017/02/20, Thomasb81, Thomas Burg, thomasb81@gmail.com
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ std::string TokenStreamRewriter::getText(const Interval &interval) {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TokenStreamRewriter::getText(const std::string &programName, const Interval &interval) {
|
std::string TokenStreamRewriter::getText(const std::string &programName, const Interval &interval) {
|
||||||
std::vector<TokenStreamRewriter::RewriteOperation*> rewrites = _programs[programName];
|
std::vector<TokenStreamRewriter::RewriteOperation*> &rewrites = _programs[programName];
|
||||||
size_t start = interval.a;
|
size_t start = interval.a;
|
||||||
size_t stop = interval.b;
|
size_t stop = interval.b;
|
||||||
|
|
||||||
|
@ -305,7 +305,8 @@ std::string TokenStreamRewriter::getText(const std::string &programName, const I
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unordered_map<size_t, TokenStreamRewriter::RewriteOperation*> TokenStreamRewriter::reduceToSingleOperationPerIndex(
|
std::unordered_map<size_t, TokenStreamRewriter::RewriteOperation*> TokenStreamRewriter::reduceToSingleOperationPerIndex(
|
||||||
std::vector<TokenStreamRewriter::RewriteOperation*> rewrites) {
|
std::vector<TokenStreamRewriter::RewriteOperation*> &rewrites) {
|
||||||
|
|
||||||
|
|
||||||
// WALK REPLACES
|
// WALK REPLACES
|
||||||
for (size_t i = 0; i < rewrites.size(); ++i) {
|
for (size_t i = 0; i < rewrites.size(); ++i) {
|
||||||
|
|
|
@ -267,7 +267,7 @@ namespace antlr4 {
|
||||||
///
|
///
|
||||||
/// Return a map from token index to operation.
|
/// Return a map from token index to operation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
virtual std::unordered_map<size_t, RewriteOperation*> reduceToSingleOperationPerIndex(std::vector<RewriteOperation*> rewrites);
|
virtual std::unordered_map<size_t, RewriteOperation*> reduceToSingleOperationPerIndex(std::vector<RewriteOperation*> &rewrites);
|
||||||
|
|
||||||
virtual std::string catOpText(std::string *a, std::string *b);
|
virtual std::string catOpText(std::string *a, std::string *b);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue