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

[Bug]: cross file parse #20

Open
ryouaki opened this issue Jan 14, 2022 · 4 comments
Open

[Bug]: cross file parse #20

ryouaki opened this issue Jan 14, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ryouaki
Copy link

ryouaki commented Jan 14, 2022

To reproduce:

// file1.wxml
<template>
  <import src="./file1.wxml"/>
  <block wx:if="{{ thing }}">
    <import src="./file2.wxml"/>
 </block>
</template>

Current behavior:
I can not get the file2 from ast

  • @wxml/parser version: 0.3.0
  • nodejs version: 16.x

I want to get file2 from ast.

@ryouaki ryouaki added the bug Something isn't working label Jan 14, 2022
@iChenLei
Copy link
Member

Parser only work for single file. Did you mean that you want get file2.wxml ast to inject to current AST tree ? That's impossible.

@iChenLei iChenLei changed the title [Bug]: [Bug]: cross file parse Jan 14, 2022
@ryouaki
Copy link
Author

ryouaki commented Jan 17, 2022

yes,get file2.wxml ast to inject to current AST tree。Current can include file1 into ast tree。but file2 is not。。。。

So i think it is a bug。just because the tag with "if"。。。。

@iChenLei
Copy link
Member

2022-01-17 12 47 42

@ryouaki
Copy link
Author

ryouaki commented Jan 21, 2022

Yes this is I want。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants