Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update julia.go #258

Merged
merged 3 commits into from
Jun 20, 2019
Merged

Update julia.go #258

merged 3 commits into from
Jun 20, 2019

Conversation

matbesancon
Copy link
Contributor

They key word is abstract type, abstract or type alone can be defined as new bindings

They key word is `abstract type`, `abstract` or `type` alone can be defined as new bindings
@matbesancon
Copy link
Contributor Author

Tested with:

package main

import (
	"github.com/alecthomas/chroma/quick"
	"os"
)

func main() {
	s := `
	struct Value
		v::Int
	end
	const r = 33
	A = zeros(3,3)
	B = rand(4,3)
	type = typeof(B)
	C = A * B'
	res = C' .+ r
	abstract v = 33
	abstract type K end
	`
	_ = quick.Highlight(os.Stdout, s, "julia", "html", "monokai")
}

Results in correct highlighting

@alecthomas
Copy link
Owner

Maybe dump that source in lexers/testdata/julia.actual then regenerate the expected output with RECORD=true go test ./lexers?

@matbesancon
Copy link
Contributor Author

Sorry for the delay, just done it and fixed the similar issue for "primitive type"

@alecthomas
Copy link
Owner

Brilliant, thanks!

@alecthomas alecthomas merged commit 6b98624 into alecthomas:master Jun 20, 2019
mrsdizzie pushed a commit to mrsdizzie/chroma that referenced this pull request Jul 15, 2020
They key word is `abstract type`, `abstract` or `type` alone can be defined as new bindings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants