Skip to content

Instantly share code, notes, and snippets.

View expipiplus1's full-sized avatar
🙀
Trying to `fix error` in Haskell

Ellie Hermaszewska expipiplus1

🙀
Trying to `fix error` in Haskell
View GitHub Profile
* = song I've yet to buy
Happy
Happy to be Unhappy - Captain Tractor
* Wake up Boo - Boo Radleys
Here Comes the Sun - The Beatles
Good Day Sunshine - The Beatles
* Walking On Sunshine - Katrina and the Waves
Good Vibrations - Beach Boys
Wouldn't it be nice - Beach Boys
/* lighting fragment shader (not quite phong)
* http://www.lighthouse3d.com/opengl/glsl/index.php/index.php?ogldir1
* James Stanley 2011
*/
#version 120
uniform sampler2D texture;
void main() {
template <std::string literal, std::string name>
std::unique_ptr< LiteralTerminal< literal, name > > LiteralTerminal::Parse( std::string::const_iterator& stream_begin, std::string::const_iterator stream_end )
{
if( ( stream_end - stream_begin ) < literal.size() )
{
if( std::equal( literal.begin(), literal.end(), stream_begin ) )
{
stream_begin += literal.size();
return std::unique_ptr< LiteralTerminal< literal, name > >( new LiteralTerminal< literal, name > );
}
template <std::string literal, std::string name = literal>
class LiteralTerminal : public JoeLang::Parser::Terminal
{
public:
LiteralTerminal() = default;
virtual ~LiteralTerminal() = default;
static std::unique_ptr< LiteralTerminal< literal, name > > Parse(std::basic_string::const_iterator &stream_begin, std::string::const_iterator stream_end );
static std::string GetName();
};
template < TerminalEnumType token_type >
class Terminal : public JoeLang::Parser::Token
{
public:
Terminal() = default;
virtual ~Terminal() = default;
static Terminal< template_type >* Parse( vector<Token*>::const_iterator& stream_begin, vector<Token*>::const_iterator stream_end );
TokenEnumType m_tokenType = token_type;
dATTEMPT SYNC
sStarting debugger 'GdbEngine' for ABI 'x86-linux-generic-elf-64bit'...
dStart parameters: 'joelang' mode: 1
dABI: x86-linux-generic-elf-64bit
dExecutable: /home/jophish/projects/joelang/build/joelang
dDirectory: /home/jophish/projects/joelang/build
dDebugger: /usr/bin/gdb
dProject: /home/jophish/projects/joelang (built: /home/jophish/projects/joelang/build)
dQML server: 127.0.0.1:3768
dSysroot:
std::unique_ptr<TranslationUnit> TranslationUnit::Parse( Lexer::Lexer& lexer )
{
lexer.PushRestorePoint();
if( lexer.PeekToken() == Lexer::TokenType::TECHNIQUE )
{
lexer.Consume();
std::string name;
if( lexer.PeekToken() == Lexer::TokenType::IDENTIFIER )
{
std::unique_ptr< TechniqueDeclaration > TechniqueDeclaration::Parse( Lexer::Lexer& lexer )
{
lexer.PushRestorePoint();
std::string name;
if( !lexer.ExpectToken( Lexer::TECHNIQUE ) )
return nullptr;
if( lexer.PeekToken() == Lexer::IDENTIFIER )
{
include/__config-52-#ifdef _WIN32
include/__config-53-# define _LIBCPP_LITTLE_ENDIAN 1
include/__config-54-# define _LIBCPP_BIG_ENDIAN 0
include/__config-55-// Compiler intrinsics (GCC or MSVC)
include/__config-56-# if (defined(_MSC_VER) && _MSC_VER >= 1400) || (__GNUC__ >= 4 && __GNUC_MINOR__ > 3)
include/__config:57:# define _LIBCP_HAS_IS_BASE_OF
include/__config-58-# endif
include/__config-59-#endif // _WIN32