mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Add BfParser_GetIndexAtLine
This commit is contained in:
parent
24b03fa5aa
commit
46fbca7668
2 changed files with 13 additions and 0 deletions
|
@ -181,6 +181,9 @@ namespace IDE.Compiler
|
|||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern void BfParser_GetLineCharAtIdx(void* bfParser, int32 idx, int32* line, int32* lineChar);
|
||||
|
||||
[CallingConvention(.Stdcall), CLink]
|
||||
static extern int32 BfParser_GetIndexAtLine(void* bfParser, int32 line);
|
||||
|
||||
public BfSystem mSystem;
|
||||
public void* mNativeBfParser;
|
||||
public bool mIsUsed;
|
||||
|
@ -442,5 +445,10 @@ namespace IDE.Compiler
|
|||
|
||||
return (line, char);
|
||||
}
|
||||
|
||||
public int GetIndexAtLine(int line)
|
||||
{
|
||||
return BfParser_GetIndexAtLine(mNativeBfParser, (.) line);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4201,3 +4201,8 @@ BF_EXPORT void BF_CALLTYPE BfParser_GetLineCharAtIdx(BfParser* bfParser, int idx
|
|||
*line = _line;
|
||||
*lineChar = _lineChar;
|
||||
}
|
||||
|
||||
BF_EXPORT int BF_CALLTYPE BfParser_GetIndexAtLine(BfParser* bfParser, int line)
|
||||
{
|
||||
return bfParser->GetIndexAtLine(line);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue