forked from jasder/antlr
commit
ce09abb480
|
@ -135,4 +135,6 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2017/01/18, mshockwave, Bekket McClane, yihshyng223@gmail.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, 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::vector<TokenStreamRewriter::RewriteOperation*> rewrites = _programs[programName];
|
||||
std::vector<TokenStreamRewriter::RewriteOperation*> &rewrites = _programs[programName];
|
||||
size_t start = interval.a;
|
||||
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::vector<TokenStreamRewriter::RewriteOperation*> rewrites) {
|
||||
std::vector<TokenStreamRewriter::RewriteOperation*> &rewrites) {
|
||||
|
||||
|
||||
// WALK REPLACES
|
||||
for (size_t i = 0; i < rewrites.size(); ++i) {
|
||||
|
@ -402,7 +403,7 @@ std::unordered_map<size_t, TokenStreamRewriter::RewriteOperation*> TokenStreamRe
|
|||
}
|
||||
m[op->index] = op;
|
||||
}
|
||||
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ namespace antlr4 {
|
|||
///
|
||||
/// Return a map from token index to operation.
|
||||
/// </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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue