Code Monkey home page Code Monkey logo

intingo's Introduction

स्वागतम्

Building Pryzm.

Writings here and contact details here.

$$\ce{$\unicode[goombafont; color:red; pointer-events: none; z-index: -10; position: fixed; top: 0; left: 0; height: 100vh; object-fit: cover; background: url('https://github.com/rajrkane/rajrkane/blob/master/mandelbrot.jpg?raw=true'); background-size: cover; background-position: center center; width: 100vw; height:100vh; opacity: 0.5;]{x0000}$}$$

intingo's People

Watchers

 avatar

intingo's Issues

Whitespaces cause failure in operator precedence parsing (section 2.7)

Despite following the text word for word, the tests for operator precedence parsing fail due to whitespaces. This is an example test.

tests := []struct {
	input    string
	expected string
}{
	{
		"-1 * 2 + 3",
		"(((-1) * 2) + 3)",
	},
}

The output of go test -v -run TestOperatorPrecedenceParsing ./parser indicates an issue with whitespaces.

expected="(((-1) * 2) + 3)", got="(((-1)*2)+3)"

The tracing statements when including defer in parser.go are as expected, and are

BEGIN parseExpressionStatement
	BEGIN parseExpression
		BEGIN parsePrefixExpression
			BEGIN parseExpression
				BEGIN parseIntegerLiteral
				END parseIntegerLiteral
			END parseExpression
		END parsePrefixExpression
		BEGIN parseInfixExpression
			BEGIN parseExpression
				BEGIN parseIntegerLiteral
				END parseIntegerLiteral
			END parseExpression
		END parseInfixExpression
		BEGIN parseInfixExpression
			BEGIN parseExpression
				BEGIN parseIntegerLiteral
				END parseIntegerLiteral
			END parseExpression
		END parseInfixExpression
	END parseExpression
END parseExpressionStatement

The tests pass after removing the whitespaces from the test expected string, but this is not a viable solution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.