diff --git a/plugins/builtin/source/content/lang_builtin_functions.cpp b/plugins/builtin/source/content/lang_builtin_functions.cpp index e9272fb08..53fd02a2b 100644 --- a/plugins/builtin/source/content/lang_builtin_functions.cpp +++ b/plugins/builtin/source/content/lang_builtin_functions.cpp @@ -195,6 +195,11 @@ namespace hex::plugin::builtin { return new ASTNodeIntegerLiteral({ Token::ValueType::Unsigned64Bit, u64(result) }); }); + + /* dataSize() */ + ContentRegistry::PatternLanguageFunctions::add("dataSize", ContentRegistry::PatternLanguageFunctions::NoParameters, [](auto &ctx, auto params) -> ASTNode* { + return new ASTNodeIntegerLiteral({ Token::ValueType::Unsigned64Bit, u64(SharedData::currentProvider->getActualSize()) }); + }); } } \ No newline at end of file