diff --git a/lib/rouge/lexers/cpp.rb b/lib/rouge/lexers/cpp.rb index 3fca7ec788..31698c2594 100644 --- a/lib/rouge/lexers/cpp.rb +++ b/lib/rouge/lexers/cpp.rb @@ -27,7 +27,7 @@ def self.keywords delete dynamic_cast explicit export friend mutable namespace new operator private protected public reinterpret_cast requires restrict size_of static_cast this throw throws - typeid typename using virtual final override + typeid typename using virtual final override import module alignas alignof decltype noexcept static_assert thread_local try diff --git a/spec/visual/samples/cpp b/spec/visual/samples/cpp index b738ec6f4e..acde3bcffe 100644 --- a/spec/visual/samples/cpp +++ b/spec/visual/samples/cpp @@ -265,3 +265,15 @@ switch (foo) { case Foo::kBar: break; } + +// modules +module; +import std; +export module Shapes; + +export struct Shape { + Shape(int x, int y) : m_x(x), m_y(y) {}; + + int m_x; + int m_y; +}