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

syntax of component placement without component tag incomplete🐛 #155

Closed
quimt opened this issue Sep 28, 2023 · 1 comment
Closed

syntax of component placement without component tag incomplete🐛 #155

quimt opened this issue Sep 28, 2023 · 1 comment
Assignees
Labels
bug Something isn't working spa

Comments

@quimt
Copy link

quimt commented Sep 28, 2023

The following code allows all but the commented component to compile. In other words, components parameters can be set without using parameter names when using the component tag, but not when omitting it.



component CTest:
  id: int = 3
  message: string = ""
  `template`:
    tDiv: "template: {self.id}"


appRoutes("ROOT"):
  "/":
    tDiv:
      component CTest(7)
      component CTest(id = 17)
      CTest()
      #CTest(0)
      CTest(id=0)


@quimt quimt added the bug Something isn't working label Sep 28, 2023
@Ethosa Ethosa self-assigned this Sep 28, 2023
@Ethosa Ethosa added the spa label Sep 28, 2023
Ethosa added a commit that referenced this issue Sep 28, 2023
@Ethosa Ethosa closed this as completed Sep 29, 2023
@quimt
Copy link
Author

quimt commented Sep 29, 2023

Works except that now CompX(): shouldBeSlot binds the colon expression as an arg to the proc, not the attached slot.

Again, the commented statements fail to compile.


component CTest:
  id: int = 3
  message: string = ""
  `template`:
    tDiv: "template: {self.id}"
    tDiv: slot


appRoutes("ROOT"):
  "/":
    tDiv:
      component CTest(7): "ok"
      component CTest(id = 17): "ok"
      #CTest(): "ok"
      #CTest(0): "ok"
      CTest(id=0): "ok"


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

No branches or pull requests

2 participants