Remove serde tags on structs
This commit is contained in:
		@ -1124,7 +1124,6 @@ impl PartialEq for Function {
 | 
			
		||||
 | 
			
		||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
 | 
			
		||||
#[ts(export)]
 | 
			
		||||
#[serde(tag = "type")]
 | 
			
		||||
pub struct VariableDeclaration {
 | 
			
		||||
    pub start: usize,
 | 
			
		||||
    pub end: usize,
 | 
			
		||||
@ -1347,7 +1346,6 @@ impl VariableDeclarator {
 | 
			
		||||
 | 
			
		||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
 | 
			
		||||
#[ts(export)]
 | 
			
		||||
#[serde(tag = "type")]
 | 
			
		||||
pub struct Literal {
 | 
			
		||||
    pub start: usize,
 | 
			
		||||
    pub end: usize,
 | 
			
		||||
 | 
			
		||||
@ -2801,4 +2801,5 @@ mod snapshot_tests {
 | 
			
		||||
    snapshot_test!(ar, r#"5 + "a""#);
 | 
			
		||||
    snapshot_test!(at, "line([0, l], %)");
 | 
			
		||||
    snapshot_test!(au, include_str!("../../../tests/executor/inputs/cylinder.kcl"));
 | 
			
		||||
    snapshot_test!(av, "const x = 3");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,40 @@
 | 
			
		||||
---
 | 
			
		||||
source: kcl/src/parser/parser_impl.rs
 | 
			
		||||
expression: actual
 | 
			
		||||
---
 | 
			
		||||
{
 | 
			
		||||
  "start": 0,
 | 
			
		||||
  "end": 11,
 | 
			
		||||
  "body": [
 | 
			
		||||
    {
 | 
			
		||||
      "type": "VariableDeclaration",
 | 
			
		||||
      "start": 0,
 | 
			
		||||
      "end": 11,
 | 
			
		||||
      "declarations": [
 | 
			
		||||
        {
 | 
			
		||||
          "type": "VariableDeclarator",
 | 
			
		||||
          "start": 6,
 | 
			
		||||
          "end": 11,
 | 
			
		||||
          "id": {
 | 
			
		||||
            "type": "Identifier",
 | 
			
		||||
            "start": 6,
 | 
			
		||||
            "end": 7,
 | 
			
		||||
            "name": "x"
 | 
			
		||||
          },
 | 
			
		||||
          "init": {
 | 
			
		||||
            "type": "Literal",
 | 
			
		||||
            "start": 10,
 | 
			
		||||
            "end": 11,
 | 
			
		||||
            "value": 3,
 | 
			
		||||
            "raw": "3"
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      "kind": "const"
 | 
			
		||||
    }
 | 
			
		||||
  ],
 | 
			
		||||
  "nonCodeMeta": {
 | 
			
		||||
    "nonCodeNodes": {},
 | 
			
		||||
    "start": []
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user