2009-07-13 20:45:15 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
2014-10-25 16:19:38 -04:00
|
|
|
* Copyright 2014, Rene Gollent, rene@gollent.com.
|
2009-07-13 20:45:15 +00:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef SOURCE_LANGUAGE_H
|
|
|
|
#define SOURCE_LANGUAGE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <Referenceable.h>
|
|
|
|
|
|
|
|
|
2012-11-06 12:22:06 +01:00
|
|
|
class BString;
|
2009-07-13 20:45:15 +00:00
|
|
|
class SyntaxHighlighter;
|
2012-11-06 12:22:06 +01:00
|
|
|
class TeamTypeInformation;
|
|
|
|
class Type;
|
2014-10-25 16:19:38 -04:00
|
|
|
class Value;
|
2009-07-13 20:45:15 +00:00
|
|
|
|
|
|
|
|
2010-12-16 13:50:30 +00:00
|
|
|
class SourceLanguage : public BReferenceable {
|
2009-07-13 20:45:15 +00:00
|
|
|
public:
|
|
|
|
virtual ~SourceLanguage();
|
|
|
|
|
|
|
|
virtual const char* Name() const = 0;
|
|
|
|
|
|
|
|
virtual SyntaxHighlighter* GetSyntaxHighlighter() const;
|
|
|
|
// returns a reference,
|
|
|
|
// may return NULL, if not available
|
2012-11-06 12:22:06 +01:00
|
|
|
|
2014-10-26 16:16:20 -04:00
|
|
|
virtual status_t ParseTypeExpression(const BString& expression,
|
2012-11-06 12:22:06 +01:00
|
|
|
TeamTypeInformation* info,
|
|
|
|
Type*& _resultType) const;
|
2014-10-25 16:19:38 -04:00
|
|
|
|
|
|
|
virtual status_t EvaluateExpression(const BString& expression,
|
2014-10-27 11:42:58 -04:00
|
|
|
type_code type, Value*& _output);
|
2009-07-13 20:45:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // SOURCE_LANGUAGE_H
|