c.tmbundle icon indicating copy to clipboard operation
c.tmbundle copied to clipboard

Keywords not highlighted after macros with parentheses

Open TheWitheredStriker opened this issue 2 years ago • 0 comments

Consider the following C++ snippets, respectively from an Unreal Engine C++ repo and a Flax Engine C++ repo (another C++ 3D engine):

// Harrison McGuire
// UE4 Version 4.20.2
// https://github.com/Harrison1/unrealcpp
// https://severallevels.io
// https://harrisonmcguire.com

#pragma once

#include "Camera/CameraShake.h"
#include "MyCameraShake.generated.h"

UCLASS()
class UNREALCPP_API UMyCameraShake: public UCameraShake {
	GENERATED_BODY()
	
	public:
		// Sets default values for this actor's properties
		UMyCameraShake();
	
};
// Copyright © 2022 PrecisionRender. All rights reserved.

#pragma once

#include "Engine/Scripting/Script.h"
#include "Engine/Core/Common.h"

class CharacterController;

API_CLASS() class GAME_API CharacterControllerPro: public Script {
    API_AUTO_SERIALIZATION();
    DECLARE_SCRIPTING_TYPE(CharacterControllerPro);


    public:
        API_ENUM()
        enum class MovementModes {
            Stopped,
            Walking,
            Running,
            Crouching
        };
// ...

From: https://github.com/Harrison1/unrealcpp/blob/master/CameraShake/MyCameraShake.h and https://github.com/PrecisionRender/CharacterControllerPro/blob/main/CharacterControllerProCPP/CharacterControllerPro.h.

As you can see, the keywords class and public are not highlighted, likely because they follow the macros UCLASS() and API_CLASS(), respectively (newlines make no difference). Oddly, the keywords that follow API_ENUM() seem to be highlighted just fine.

TheWitheredStriker avatar Aug 12 '23 11:08 TheWitheredStriker