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

inaccurate node.end offset for FunctionDeclaration #9

Open
duaraghav8 opened this issue Sep 23, 2016 · 0 comments
Open

inaccurate node.end offset for FunctionDeclaration #9

duaraghav8 opened this issue Sep 23, 2016 · 0 comments

Comments

@duaraghav8
Copy link
Owner

and also for ModifierDeclarations

code = contract Foo {\n\tmodifier bar () returns (string) {\n\t\treturn "Hello";\n\t}\n\n\n\tfunction baz () {}\n}

a = sp.parse (code).body [0]

code.slice (0,a.body [0].end)

returns

contract Foo {\n\tmodifier bar () returns (string) {\n\t\treturn "Hello";\n\t}\n\n\n\t

should've stopped at "}" but also included the whitespace

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

No branches or pull requests

1 participant