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

Commenting out line via // in a fillet tags list causes syntax error - unexpected token #3479

Closed
yeroca opened this issue Aug 16, 2024 · 3 comments

Comments

@yeroca
Copy link

yeroca commented Aug 16, 2024

[Add a title above and insert a description of the issue here]

Title line pretty much describes the whole thing. Code attached here has first tag in fillet commented out, and results in a syntax error, which I think it shouldn't. // should just cause the rest of the line to be ignored, and lexical parsing should resume on the following line.

Am I using the wrong commenting syntax?

Screenshot

Core Dump

coredump-811d9c30-5d92-4421-ba42-893b94cd8721.json

Reference ID: 811d9c30-5d92-4421-ba42-893b94cd8721

KCL Code
const holeFudge = 0.4
const frontBarD = 5.0
const yBarD = 6.7
const lowerBlockTransHoleD = frontBarD + holeFudge
const lowerBlockTransHoleR = lowerBlockTransHoleD / 2
const upperBlockLongHoleD = yBarD + holeFudge
const upperBlockLongHoleR = upperBlockLongHoleD / 2
const upperBlockTransHoleD = yBarD + holeFudge
const upperBlockTransHoleR = upperBlockTransHoleD / 2
const tubeClr = 1.5
const lowerBlockH = lowerBlockTransHoleD + 2 * tubeClr
const upperBlockH = upperBlockLongHoleD + 2 * tubeClr
const elevateH = 15
const upperBlockL = 25
const lowerBlockL = 35
const blockSz = max(upperBlockH, lowerBlockH)
const sketch001 = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> yLine(blockSz, %, $edgeA)
  |> xLine(blockSz, %, $edgeB)
  |> yLine(-blockSz, %, $edgeC)
  |> xLine(upperBlockL - blockSz, %, $edge1)
  |> yLine(-(elevateH + blockSz), %, $edge2)
  |> xLine(lowerBlockL - blockSz, %, $edge3)
  |> yLine(-blockSz, %, $edge4)
  |> xLine(-lowerBlockL, %, $edge5)
  |> yLine(blockSz + elevateH, %, $edge6)
  |> xLine(-(upperBlockL - blockSz), %, $edge7)
  |> lineTo([profileStartX(%), profileStartY(%)], %, $seg01)
  |> close(%)
  |> hole(circle([blockSz / 2, blockSz / 2], upperBlockTransHoleR, %), %)
  |> hole(circle([
       upperBlockL + lowerBlockL - blockSz - (lowerBlockTransHoleR) - tubeClr,
       -(blockSz + elevateH + blockSz / 2)
     ], lowerBlockTransHoleR, %), %)
const rad = 3
const extrude001 = extrude(blockSz, sketch001)
  |> fillet({
       radius: rad,
       tags: [
         // getNextAdjacentEdge(edgeA),
         getNextAdjacentEdge(edgeB),
         getNextAdjacentEdge(edgeC),
         getNextAdjacentEdge(edge2),
         getNextAdjacentEdge(edge3),
         getNextAdjacentEdge(edge4),
         getNextAdjacentEdge(edge5),
         getNextAdjacentEdge(edge6)
       ]
     }, %)

const sketch002 = startSketchOn(extrude001, seg01)
   |> startProfileAt([0, 0], %)
   |> circle([blockSz / 2, -blockSz / 2], upperBlockLongHoleR, %)
const extrude2 = extrude(-upperBlockL, sketch002)

@jtran
Copy link
Collaborator

jtran commented Aug 16, 2024

@yeroca
Copy link
Author

yeroca commented Aug 17, 2024

Duplicate?

* [KCL: Inline comments for multiline expressions #1528](https://github.com/KittyCAD/modeling-app/issues/1528)

Yes, sorry, please mark as duplicate and close.

@jessfraz
Copy link
Contributor

closing as dupe of #1528 also removed the low priority from that one as we should fix it

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

3 participants