SpacemanDMM
SpacemanDMM copied to clipboard
Can't parse library inclusions
#include<author/library/library.dme>
in a .dm file gives
unexpected token Punct(Less), expecting Token::String(path)
path separated by '.', should be '/'
got '>', expected one of: '/', '[', contents, newline, identifier
Was aware of this, but thanks for officially filing it
Can't #include non-library .dme files either:
unknown extension "dme"
.dme
files are treated just like .dm
files as of 574f1f780eed39be19e7aeb5cd04066980458740.
Library inclusion requires more work due to the way the parser is structured.
What's the problem with this currently?
#include <a/b/c.dm>
is tokenized as [Less, "a", Slash, "b", Slash, "c", Dot, "dm", Greater] and preprocessor chokes on it because it wants a single string literal
Note that there are two prongs to this:
- Changing the way the lexer and preprocessor interact so that the preprocessor can see
<a/b/c.dm>
as a single unit rather than a token stream - Determining BYOND install locations so that a
<>
include can actually be located and parsed
Is there a workaround to this? I just ran into the same problem. The parser cannot continue and all evaluation gets skipped.
The workaround is to copy-paste the libraries into your project's source tree instead of using BYOND's library system.