Skip to content

[BUG] token stores start, count instead of string_view to save space, but padding gets in the way #517

Closed
@PoetaKodu

Description

@PoetaKodu

Describe the bug

I came across this comment:
https://github.com/hsutter/cppfront/blob/main/source/lex.h#L312

The problem is that because of padding, the structure takes up the same amount of space as if it
contained string_view instead.

Another problem is that in theory user could input a string literal token that is over 2^16 characters long.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions