From 0a2219668d26d9b2191b1e7ef9627b589efb3c86 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Mon, 11 Sep 2023 12:13:01 +0200 Subject: [PATCH] gccrs: Add license text to libproc_macro rust interface The license text was missing in rust files producing the libproc_macro interface to the libproc_macro_internal library. libgrust/ChangeLog: * libproc_macro/bridge.rs: Add license text. * libproc_macro/bridge/ffistring.rs: Likewise. * libproc_macro/bridge/group.rs: Likewise. * libproc_macro/bridge/ident.rs: Likewise. * libproc_macro/bridge/literal.rs: Likewise. * libproc_macro/bridge/punct.rs: Likewise. * libproc_macro/bridge/span.rs: Likewise. * libproc_macro/bridge/token_stream.rs: Likewise. * libproc_macro/group.rs: Likewise. * libproc_macro/ident.rs: Likewise. * libproc_macro/lib.rs: Likewise. * libproc_macro/literal.rs: Likewise. * libproc_macro/punct.rs: Likewise. * libproc_macro/span.rs: Likewise. * libproc_macro/token_stream.rs: Likewise. Signed-off-by: Pierre-Emmanuel Patry --- libgrust/libproc_macro/bridge.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/bridge/ffistring.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/bridge/group.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/bridge/ident.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/bridge/literal.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/bridge/punct.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/bridge/span.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/bridge/token_stream.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/group.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/ident.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/lib.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/literal.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/punct.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/span.rs | 22 +++++++++++++++++++ libgrust/libproc_macro/token_stream.rs | 22 +++++++++++++++++++ 15 files changed, 330 insertions(+) diff --git a/libgrust/libproc_macro/bridge.rs b/libgrust/libproc_macro/bridge.rs index 3900ae1884b..4f33af187ea 100644 --- a/libgrust/libproc_macro/bridge.rs +++ b/libgrust/libproc_macro/bridge.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + pub mod ffistring; pub mod group; pub mod ident; diff --git a/libgrust/libproc_macro/bridge/ffistring.rs b/libgrust/libproc_macro/bridge/ffistring.rs index 73162e901fe..09de02a026f 100644 --- a/libgrust/libproc_macro/bridge/ffistring.rs +++ b/libgrust/libproc_macro/bridge/ffistring.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use std::convert::TryInto; use std::ffi::c_uchar; use std::fmt; diff --git a/libgrust/libproc_macro/bridge/group.rs b/libgrust/libproc_macro/bridge/group.rs index 254a3db746d..007c3c6b574 100644 --- a/libgrust/libproc_macro/bridge/group.rs +++ b/libgrust/libproc_macro/bridge/group.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge::span::Span; use bridge::token_stream::TokenStream; use std::fmt; diff --git a/libgrust/libproc_macro/bridge/ident.rs b/libgrust/libproc_macro/bridge/ident.rs index d58896dbd3e..465fe3bfdb6 100644 --- a/libgrust/libproc_macro/bridge/ident.rs +++ b/libgrust/libproc_macro/bridge/ident.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge::ffistring::FFIString; use bridge::span::Span; use std::fmt; diff --git a/libgrust/libproc_macro/bridge/literal.rs b/libgrust/libproc_macro/bridge/literal.rs index 59825048970..4a108cc0558 100644 --- a/libgrust/libproc_macro/bridge/literal.rs +++ b/libgrust/libproc_macro/bridge/literal.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge::{ffistring::FFIString, span::Span}; use std::fmt; use std::str::FromStr; diff --git a/libgrust/libproc_macro/bridge/punct.rs b/libgrust/libproc_macro/bridge/punct.rs index e835472f233..ebe5ed401f1 100644 --- a/libgrust/libproc_macro/bridge/punct.rs +++ b/libgrust/libproc_macro/bridge/punct.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge::span::Span; use std::convert::TryFrom; use std::fmt; diff --git a/libgrust/libproc_macro/bridge/span.rs b/libgrust/libproc_macro/bridge/span.rs index 06537c93d69..f22b4e7dffa 100644 --- a/libgrust/libproc_macro/bridge/span.rs +++ b/libgrust/libproc_macro/bridge/span.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + //! Bridge internal span representation and functions //! //! # Note diff --git a/libgrust/libproc_macro/bridge/token_stream.rs b/libgrust/libproc_macro/bridge/token_stream.rs index 094f91f1370..42cba6264ce 100644 --- a/libgrust/libproc_macro/bridge/token_stream.rs +++ b/libgrust/libproc_macro/bridge/token_stream.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge::{ffistring::FFIString, group::Group, ident::Ident, literal::Literal, punct::Punct}; use std::convert::TryInto; use std::fmt; diff --git a/libgrust/libproc_macro/group.rs b/libgrust/libproc_macro/group.rs index 29bfb9d7132..46286d566ce 100644 --- a/libgrust/libproc_macro/group.rs +++ b/libgrust/libproc_macro/group.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge; use std::fmt; use Span; diff --git a/libgrust/libproc_macro/ident.rs b/libgrust/libproc_macro/ident.rs index 809c9939e09..21a3a999ead 100644 --- a/libgrust/libproc_macro/ident.rs +++ b/libgrust/libproc_macro/ident.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge; use std::fmt; use Span; diff --git a/libgrust/libproc_macro/lib.rs b/libgrust/libproc_macro/lib.rs index a1be0ac57e7..8b7662a8337 100644 --- a/libgrust/libproc_macro/lib.rs +++ b/libgrust/libproc_macro/lib.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + pub use group::{Delimiter, Group}; pub use ident::Ident; pub use literal::Literal; diff --git a/libgrust/libproc_macro/literal.rs b/libgrust/libproc_macro/literal.rs index 171ca56536e..05cc28b1af2 100644 --- a/libgrust/libproc_macro/literal.rs +++ b/libgrust/libproc_macro/literal.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge; use std::fmt; use std::str::FromStr; diff --git a/libgrust/libproc_macro/punct.rs b/libgrust/libproc_macro/punct.rs index 0f7830e0f7c..40c378e10d9 100644 --- a/libgrust/libproc_macro/punct.rs +++ b/libgrust/libproc_macro/punct.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge; use std::convert::TryInto; use std::fmt; diff --git a/libgrust/libproc_macro/span.rs b/libgrust/libproc_macro/span.rs index b5d573cc5af..5ea2db85af5 100644 --- a/libgrust/libproc_macro/span.rs +++ b/libgrust/libproc_macro/span.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + use bridge; use std::fmt; diff --git a/libgrust/libproc_macro/token_stream.rs b/libgrust/libproc_macro/token_stream.rs index 9333e3ea2fc..4981ddebb73 100644 --- a/libgrust/libproc_macro/token_stream.rs +++ b/libgrust/libproc_macro/token_stream.rs @@ -1,3 +1,25 @@ +// Copyright (C) 2023 Free Software Foundation, Inc. +// +// This file is part of the GNU Proc Macro Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// . + //! Public implementation details for the `TokenStream` type, such as iterators. use bridge; use std::convert::TryInto;