src/cpp-common: add `bt2c::TextLoc` class
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 17 Apr 2024 17:49:55 +0000 (13:49 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 4 Sep 2024 19:05:14 +0000 (15:05 -0400)
commit2a8eb1258a6c3081d1cad4f7a3df0e0ca7880bce
treedb6d08ff770a36cc036548a22b773055c682a126
parenta03d417592d1fa02cb427d1ce239bad1e4f42c90
src/cpp-common: add `bt2c::TextLoc` class

This patch adds the `bt2c::TextLoc` class, defined in `text-loc.hpp` and
implemented in `text-loc.cpp`.

A text location is a location within some text: an offset (in bytes), a
line number, and a column number.

This is part of an effort to implement a JSON parser to
support CTF2‑SPEC‑2.0 [1].

[1]: https://diamon.org/ctf/CTF2-SPEC-2.0.html

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ice9cab35041f1637d220deb6af8f52dbfc8cd290
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7408
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12678
src/Makefile.am
src/cpp-common/bt2c/text-loc.cpp [new file with mode: 0644]
src/cpp-common/bt2c/text-loc.hpp [new file with mode: 0644]
This page took 0.024274 seconds and 4 git commands to generate.