Example #1
0
LocationPtr ParserBase::getLocation() const {
    LocationPtr location(new Location());
    location->file  = file();
    location->line0 = line0();
    location->char0 = char0();
    location->line1 = line1();
    location->char1 = char1();
    return location;
}
Example #2
0
LocationPtr ParserBase::getLocation() const {
  auto location = std::make_shared<Location>();
  location->file  = file();
  location->line0 = line0();
  location->char0 = char0();
  location->line1 = line1();
  location->char1 = char1();
  location->cursor = cursor();
  return location;
}