Sarrus1 / sourcepawn-studio

VSCode extension for SourcePawn scripting
https://sarrus1.github.io/sourcepawn-studio/
MIT License
151 stars 23 forks source link

Syntax error when using methodmaps as macro parameters #413

Closed Alienmario closed 4 months ago

Alienmario commented 4 months ago

Basic informations

Code to reproduce the behaviour

#define FOO(%1) %1.dostuff();

methodmap Bar {
    public void dostuff() {

    }
}

public void OnPluginStart()
{
    Bar bar;
    FOO(bar) // sourcepawn-studio(syntax-error)
}

Error messages

expected "`identifier`, `(`, `!`, `~`, `-`, `+`, `&`, `#include`, `#tryinclude`, `#define`, `#undef`, `#if`, `#elseif`, `#assert`, `preproc_else`, `preproc_endif`, `preproc_endinput`, `#pragma`, `#error`, `#warning`, `const`, `public`, `stock`, `static`, `new`, `decl`, `{`, `}`, `void`, `bool`, `int`, `float`, `char`, `_`, `Float`, `String`, `any_type`, `for`, `while`, `do`, `break`, `continue`, `if`, `else`, `switch`, `return`, `delete`, `--`, `++`, `sizeof`, `view_as`, `int_literal`, `float_literal`, `'`, `\"`, `bool_literal`, `null`, `this`, `comment`, `preproc_include`, `preproc_tryinclude`, `preproc_macro`, `preproc_define`, `preproc_undefine`, `preproc_if`, `preproc_elseif`, `preproc_assert`, `preproc_pragma`, `preproc_error`, `preproc_warning`"sourcepawn-studio(syntax-error)