public override void Visit(BareKeySyntax bareKey)
 {
     if (bareKey.Key == null)
     {
         _diagnostics.Error(bareKey.Span, $"A BareKeySyntax must have a non null property Key");
     }
     base.Visit(bareKey);
 }
 /// <summary>
 /// Creates an instance of <see cref="DottedKeyItemSyntax"/>
 /// </summary>
 /// <param name="key">The key used after the `.`</param>
 public DottedKeyItemSyntax(string key) : this()
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     Dot = SyntaxFactory.Token(TokenKind.Dot);
     Key = BareKeySyntax.IsBareKey(key) ? (BareKeyOrStringValueSyntax) new BareKeySyntax(key) : new StringValueSyntax(key);
 }
 /// <summary>
 /// Creates a new instance of a <see cref="KeySyntax"/>
 /// </summary>
 /// <param name="key">the base key</param>
 /// <param name="dotKey1">the key after the dot</param>
 public KeySyntax(string key, string dotKey1) : this()
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     if (dotKey1 == null)
     {
         throw new ArgumentNullException(nameof(dotKey1));
     }
     Key = BareKeySyntax.IsBareKey(key) ? (BareKeyOrStringValueSyntax) new BareKeySyntax(key) : new StringValueSyntax(key);
     DotKeys.Add(new DottedKeyItemSyntax(dotKey1));
 }
 public virtual void Visit(BareKeySyntax bareKey)
 {
     DefaultVisit(bareKey);
 }
 /// <summary>
 /// Creates a new instance of a <see cref="KeySyntax"/>
 /// </summary>
 /// <param name="key">A simple name of this key</param>
 public KeySyntax(string key) : this()
 {
     Key = BareKeySyntax.IsBareKey(key) ? (BareKeyOrStringValueSyntax) new BareKeySyntax(key) : new StringValueSyntax(key);
 }