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

Lexeme loses starting spaces in multi-line #674

Closed
Ehcsan opened this issue Feb 23, 2024 · 2 comments
Closed

Lexeme loses starting spaces in multi-line #674

Ehcsan opened this issue Feb 23, 2024 · 2 comments
Labels
bug Something isn't working reconstruct code deals with the code reoncsutrction at the end of the static slicing

Comments

@Ehcsan
Copy link
Collaborator

Ehcsan commented Feb 23, 2024

If the input is multi-line the call to lexeme loses starting spaces in the consecutive lines

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<exprlist>
<expr line1="1" col1="1" line2="2" col2="8" start="29" end="64">a &lt;- function (x) { x &lt;- 2;
x + 4 }
<expr line1="1" col1="1" line2="1" col2="1" start="29" end="29">a
<SYMBOL line1="1" col1="1" line2="1" col2="1" start="29" end="29">a</SYMBOL>
</expr>
<LEFT_ASSIGN line1="1" col1="3" line2="1" col2="4" start="31" end="32">&lt;-</LEFT_ASSIGN>
<expr line1="1" col1="6" line2="2" col2="8" start="34" end="64">function (x) { x &lt;- 2;
x + 4 }
<FUNCTION line1="1" col1="6" line2="1" col2="13" start="34" end="41">function</FUNCTION>
<OP-LEFT-PAREN line1="1" col1="15" line2="1" col2="15" start="43" end="43">(</OP-LEFT-PAREN>
<SYMBOL_FORMALS line1="1" col1="16" line2="1" col2="16" start="44" end="44">x</SYMBOL_FORMALS>
<OP-RIGHT-PAREN line1="1" col1="17" line2="1" col2="17" start="45" end="45">)</OP-RIGHT-PAREN>
<expr line1="1" col1="19" line2="2" col2="8" start="47" end="64">{ x &lt;- 2;
x + 4 }
<OP-LEFT-BRACE line1="1" col1="19" line2="1" col2="19" start="47" end="47">{</OP-LEFT-BRACE>
<exprlist line1="1" col1="21" line2="1" col2="27" start="49" end="55">x &lt;- 2;
<expr line1="1" col1="21" line2="1" col2="26" start="49" end="54">x &lt;- 2
<expr line1="1" col1="21" line2="1" col2="21" start="49" end="49">x
<SYMBOL line1="1" col1="21" line2="1" col2="21" start="49" end="49">x</SYMBOL>
</expr>
<LEFT_ASSIGN line1="1" col1="23" line2="1" col2="24" start="51" end="52">&lt;-</LEFT_ASSIGN>
<expr line1="1" col1="26" line2="1" col2="26" start="54" end="54">2
<NUM_CONST line1="1" col1="26" line2="1" col2="26" start="54" end="54">2</NUM_CONST>
</expr>
</expr>
<OP-SEMICOLON line1="1" col1="27" line2="1" col2="27" start="55" end="55">;</OP-SEMICOLON>
</exprlist>
<expr line1="2" col1="2" line2="2" col2="6" start="58" end="62">x + 4
<expr line1="2" col1="2" line2="2" col2="2" start="58" end="58">x
<SYMBOL line1="2" col1="2" line2="2" col2="2" start="58" end="58">x</SYMBOL>
</expr>
<OP-PLUS line1="2" col1="4" line2="2" col2="4" start="60" end="60">+</OP-PLUS>
<expr line1="2" col1="6" line2="2" col2="6" start="62" end="62">4
<NUM_CONST line1="2" col1="6" line2="2" col2="6" start="62" end="62">4</NUM_CONST>
</expr>
</expr>
<OP-RIGHT-BRACE line1="2" col1="8" line2="2" col2="8" start="64" end="64">}</OP-RIGHT-BRACE>
</expr>
</expr>
</expr>
</exprlist>
@Ehcsan Ehcsan added bug Something isn't working reconstruct code deals with the code reoncsutrction at the end of the static slicing labels Feb 23, 2024
@EagleoutIce
Copy link
Member

This should be fixed with #659 and #684. Please merge main accordingly and re-check.

@EagleoutIce
Copy link
Member

No longer a problem with #526.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reconstruct code deals with the code reoncsutrction at the end of the static slicing
Projects
None yet
Development

No branches or pull requests

2 participants