-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(block): append inserts withouth attributes
- Loading branch information
1 parent
898a26b
commit 9151c1a
Showing
5 changed files
with
79 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
*.dll | ||
*.so | ||
*.dylib | ||
*.idea | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package parser | ||
|
||
import ( | ||
"log" | ||
|
||
"github.com/aichingert/dxf/pkg/drawing" | ||
_ "github.com/aichingert/dxf/pkg/entity" | ||
) | ||
|
||
func ParseTables(r *Reader, dxf *drawing.Dxf) error { | ||
for r.ScanDxfLine() { | ||
switch r.DxfLine().Line { | ||
case "TABLE": | ||
Wrap(parseTable, r, dxf) | ||
case "ENDSEC": | ||
return r.Err() | ||
default: | ||
log.Println("Table(", Line, "): ", r.DxfLine().Line) | ||
return r.Err() | ||
} | ||
|
||
if WrappedErr != nil { | ||
return WrappedErr | ||
} | ||
} | ||
|
||
return r.Err() | ||
} | ||
|
||
func parseTable(r *Reader, dxf *drawing.Dxf) error { | ||
|
||
for r.ScanDxfLine() { | ||
switch r.DxfLine().Line { | ||
case "VPORT": | ||
fallthrough | ||
case "LTYPE": | ||
fallthrough | ||
case "LAYER": | ||
fallthrough | ||
case "STYLE": | ||
fallthrough | ||
case "VIEW": | ||
fallthrough | ||
case "UCS": | ||
fallthrough | ||
case "APPID": | ||
fallthrough | ||
case "DIMSTYLE": | ||
r.SkipToLabel("ENDTAB") | ||
return r.Err() | ||
|
||
log.Fatal(r.DxfLine()) | ||
default: | ||
log.Fatal(Line, r.DxfLine()) | ||
} | ||
|
||
} | ||
|
||
return r.Err() | ||
} |